mirror of
https://github.com/ziglang/zig.git
synced 2025-12-16 11:13:08 +00:00
parent
67491a4222
commit
0eddee449d
@ -1007,3 +1007,10 @@ test "enum literal casting to error union with payload enum" {
|
|||||||
|
|
||||||
expect((try bar) == Bar.B);
|
expect((try bar) == Bar.B);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test "enum with one member and u1 tag type @enumToInt" {
|
||||||
|
const Enum = enum(u1) {
|
||||||
|
Test,
|
||||||
|
};
|
||||||
|
expect(@enumToInt(Enum.Test) == 0);
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user