zig/test/cases/pub_enum/index.zig

14 lines
291 B
Zig
Raw Normal View History

const other = @import("other.zig");
2017-01-05 16:57:48 +08:00
const assert = @import("std").debug.assert;
2016-12-26 15:42:31 +08:00
2017-05-24 09:38:31 +08:00
test "pub enum" {
2016-12-26 15:42:31 +08:00
pubEnumTest(other.APubEnum.Two);
}
fn pubEnumTest(foo: other.APubEnum) {
assert(foo == other.APubEnum.Two);
}
2017-05-24 09:38:31 +08:00
test "cast with imported symbol" {
2016-12-26 15:42:31 +08:00
assert(other.size_t(42) == 42);
}