about summary refs log tree commit diff
path: root/lang/zig/enums-packed.zig
blob: b5baaabff732b1319b7b3aad20ff3995e528db23 (plain) (blame)
1
2
3
4
5
6
7
const expect = @import("std").testing.expect;

test "packed enum" {
    // Warranty enum size.
    const Number = packed enum(u2) { one, two, three };
    expect(@sizeOf(Number) == @sizeOf(u8));
}