zig/test/cases/pub_enum/index.zig

24 lines
415 B
Zig
Raw Normal View History

2016-12-25 23:49:30 -08:00
const other = @import("cases/pub_enum/other.zig");
2016-12-25 23:42:31 -08:00
fn pubEnum() {
@setFnTest(this);
pubEnumTest(other.APubEnum.Two);
}
fn pubEnumTest(foo: other.APubEnum) {
assert(foo == other.APubEnum.Two);
}
fn castWithImportedSymbol() {
@setFnTest(this);
assert(other.size_t(42) == 42);
}
// TODO const assert = @import("std").debug.assert;
fn assert(ok: bool) {
if (!ok)
@unreachable();
}