SIGN IN SIGN UP
2023-05-11 09:23:34 +03:30
const builtin = @import("builtin");
2019-03-02 16:46:04 -05:00
const other = @import("pub_enum/other.zig");
const expect = @import("std").testing.expect;
2016-12-26 02:42:31 -05:00
2017-05-23 21:38:31 -04:00
test "pub enum" {
if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
2024-01-13 18:44:44 +01:00
try pubEnumTest(other.APubEnum.Two);
2016-12-26 02:42:31 -05:00
}
fn pubEnumTest(foo: other.APubEnum) !void {
try expect(foo == other.APubEnum.Two);
2016-12-26 02:42:31 -05:00
}
2017-05-23 21:38:31 -04:00
test "cast with imported symbol" {
if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
2024-01-13 18:44:44 +01:00
try expect(@as(other.size_t, 42) == 42);
2016-12-26 02:42:31 -05:00
}