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

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

test "cast with imported symbol" {
    try expect(@as(other.size_t, 42) == 42);
}