mirror of
https://github.com/ziglang/zig.git
synced 2026-02-14 13:30:45 +00:00
add behavioral test case for previous commit
This commit is contained in:
parent
f64cff3e16
commit
b1895da9b8
@ -130,3 +130,17 @@ test "Type.Undefined" {
|
||||
test "Type.Null" {
|
||||
testTypes(&[_]type{@typeOf(null)});
|
||||
}
|
||||
test "@Type create slice with null sentinel" {
|
||||
const Slice = @Type(builtin.TypeInfo{
|
||||
.Pointer = .{
|
||||
.size = .Slice,
|
||||
.is_const = true,
|
||||
.is_volatile = false,
|
||||
.is_allowzero = false,
|
||||
.alignment = 8,
|
||||
.child = *i32,
|
||||
.sentinel = null,
|
||||
},
|
||||
});
|
||||
testing.expect(Slice == []align(8) const *i32);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user