diff options
Diffstat (limited to 'test/behavior/enum.zig')
| -rw-r--r-- | test/behavior/enum.zig | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/behavior/enum.zig b/test/behavior/enum.zig index 9e96163cc0..517414780b 100644 --- a/test/behavior/enum.zig +++ b/test/behavior/enum.zig @@ -1170,3 +1170,8 @@ test "switch on an extern enum with negative value" { Foo.Bar => return, } } + +test "Non-exhaustive enum with nonstandard int size behaves correctly" { + const E = enum(u15) { _ }; + try expect(@sizeOf(E) == @sizeOf(u15)); +} |
