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