| 1 | const builtin = @import("builtin"); |
| 2 | const other = @import("pub_enum/other.zig"); |
| 3 | const expect = @import("std").testing.expect; |
| 4 | |
| 5 | test "pub enum" { |
| 6 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 7 | |
| 8 | try pubEnumTest(other.APubEnum.Two); |
| 9 | } |
| 10 | fn pubEnumTest(foo: other.APubEnum) !void { |
| 11 | try expect(foo == other.APubEnum.Two); |
| 12 | } |
| 13 | |
| 14 | test "cast with imported symbol" { |
| 15 | if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; |
| 16 | |
| 17 | try expect(@as(other.size_t, 42) == 42); |
| 18 | } |