| author | |
| committer | |
| log | b1895da9b8c41152d146b54e16162de44a08a087 |
| tree | 16d5d36c4a0e38081c8580cfeda6a41267212b76 |
| parent | f64cff3e1609c3930dd39dbaed02dc28695ea9c7 |
| signature | Commit is signed but in an unrecognized format. |
1 files changed, 14 insertions(+), 0 deletions(-)
test/stage1/behavior/type.zig+14| ... | ... | @@ -130,3 +130,17 @@ test "Type.Undefined" { |
| 130 | 130 | test "Type.Null" { |
| 131 | 131 | testTypes(&[_]type{@typeOf(null)}); |
| 132 | 132 | } |
| 133 | test "@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 | } |