srctree

dweiller parent 8108c9f4 a219c9fa
test/behavior: fix test type check for multi-ptr slice

The original test was checking the types of irrelevant slices, the testis for slicing of multi-pointers _without_ an end value, but the typesof slices with an end value were being checked.

inlinesplit
test/behavior/slice.zig added: 3, removed: 4, total 0
@@ -376,9 +376,8 @@ test "slice multi-pointer without end" {
var array = [5:0]u8{ 1, 2, 3, 4, 5 };
const pointer: [*:0]u8 = &array;
 
comptime assert(@TypeOf(pointer[1..3]) == *[2]u8);
comptime assert(@TypeOf(pointer[1..3 :4]) == *[2:4]u8);
comptime assert(@TypeOf(pointer[1..5 :0]) == *[4:0]u8);
comptime assert(@TypeOf(pointer[1..]) == [*:0]u8);
comptime assert(@TypeOf(pointer[1.. :0]) == [*:0]u8);
 
const slice = pointer[1..];
comptime assert(@TypeOf(slice) == [*:0]u8);