authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-12-06 12:27:56-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-12-06 12:27:56-05:00
logb1895da9b8c41152d146b54e16162de44a08a087
tree16d5d36c4a0e38081c8580cfeda6a41267212b76
parentf64cff3e1609c3930dd39dbaed02dc28695ea9c7
signature Commit is signed but in an unrecognized format.

add behavioral test case for previous commit


1 files changed, 14 insertions(+), 0 deletions(-)

test/stage1/behavior/type.zig+14
...@@ -130,3 +130,17 @@ test "Type.Undefined" {...@@ -130,3 +130,17 @@ test "Type.Undefined" {
130test "Type.Null" {130test "Type.Null" {
131 testTypes(&[_]type{@typeOf(null)});131 testTypes(&[_]type{@typeOf(null)});
132}132}
133test "@Type create slice with null sentinel" {
134 const Slice = @Type(builtin.TypeInfo{
135 .Pointer = .{
136 .size = .Slice,
137 .is_const = true,
138 .is_volatile = false,
139 .is_allowzero = false,
140 .alignment = 8,
141 .child = *i32,
142 .sentinel = null,
143 },
144 });
145 testing.expect(Slice == []align(8) const *i32);
146}