diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-07-16 13:37:16 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-07-16 13:37:16 -0400 |
| commit | 558b0b87913dfb6e6b76f5dbe2c36b920302faab (patch) | |
| tree | 40153dfe995f127577db5e277cbec618aff2c30e /test | |
| parent | 2255f275a0397ac44a5e8bc907643082fe304336 (diff) | |
| parent | d3ce9d0643421da77063472cb1124123cda753bb (diff) | |
| download | zig-558b0b87913dfb6e6b76f5dbe2c36b920302faab.tar.gz zig-558b0b87913dfb6e6b76f5dbe2c36b920302faab.zip | |
Merge remote-tracking branch 'origin/master' into llvm7
Diffstat (limited to 'test')
| -rw-r--r-- | test/cases/misc.zig | 5 | ||||
| -rw-r--r-- | test/cases/struct.zig | 1 | ||||
| -rw-r--r-- | test/compile_errors.zig | 9 |
3 files changed, 9 insertions, 6 deletions
diff --git a/test/cases/misc.zig b/test/cases/misc.zig index 0f181a7b4e..1c0189571b 100644 --- a/test/cases/misc.zig +++ b/test/cases/misc.zig @@ -58,11 +58,6 @@ test "floating point primitive bit counts" { assert(f64.bit_count == 64); } -const u1 = @IntType(false, 1); -const u63 = @IntType(false, 63); -const i1 = @IntType(true, 1); -const i63 = @IntType(true, 63); - test "@minValue and @maxValue" { assert(@maxValue(u1) == 1); assert(@maxValue(u8) == 255); diff --git a/test/cases/struct.zig b/test/cases/struct.zig index 2941ecb56a..20d46999d5 100644 --- a/test/cases/struct.zig +++ b/test/cases/struct.zig @@ -240,7 +240,6 @@ fn getC(data: *const BitField1) u2 { return data.c; } -const u24 = @IntType(false, 24); const Foo24Bits = packed struct { field: u24, }; diff --git a/test/compile_errors.zig b/test/compile_errors.zig index 58c73b8ae4..d5582b1584 100644 --- a/test/compile_errors.zig +++ b/test/compile_errors.zig @@ -3,6 +3,15 @@ const tests = @import("tests.zig"); pub fn addCases(cases: *tests.CompileErrorContext) void { cases.add( "optional pointer to void in extern struct", + \\comptime { + \\ _ = @IntType(false, @maxValue(u32) + 1); + \\} + , + ".tmp_source.zig:2:40: error: integer value 4294967296 cannot be implicitly casted to type 'u32'", + ); + + cases.add( + "optional pointer to void in extern struct", \\const Foo = extern struct { \\ x: ?*const void, \\}; |
