aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/pub_enum.zig
blob: c0935b78be2d65afb20e8626019e7e9a1a9b3d0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
const builtin = @import("builtin");
const other = @import("pub_enum/other.zig");
const expect = @import("std").testing.expect;

test "pub enum" {
    if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;

    try pubEnumTest(other.APubEnum.Two);
}
fn pubEnumTest(foo: other.APubEnum) !void {
    try expect(foo == other.APubEnum.Two);
}

test "cast with imported symbol" {
    if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;

    try expect(@as(other.size_t, 42) == 42);
}