zig/test/behavior/pub_enum.zig
Andrew Kelley 4307436b99 move behavior tests from test/stage1/ to test/
And fix test cases to make them pass. This is in preparation for
starting to pass behavior tests with self-hosted.
2021-04-29 15:54:04 -07:00

14 lines
312 B
Zig

const other = @import("pub_enum/other.zig");
const expect = @import("std").testing.expect;
test "pub enum" {
pubEnumTest(other.APubEnum.Two);
}
fn pubEnumTest(foo: other.APubEnum) void {
expect(foo == other.APubEnum.Two);
}
test "cast with imported symbol" {
expect(@as(other.size_t, 42) == 42);
}