test/behavior: fix test type check for multi-ptr slice
The original test was checking the types of irrelevant slices, the test is for slicing of multi-pointers _without_ an end value, but the types of slices with an end value were being checked.
This commit is contained in:
parent
8108c9f4d2
commit
a219c9faaa
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user