2019-03-02 21:46:04 +00:00
|
|
|
const other = @import("pub_enum/other.zig");
|
2019-02-08 23:18:47 +00:00
|
|
|
const expect = @import("std").testing.expect;
|
2016-12-26 07:42:31 +00:00
|
|
|
|
2017-05-24 02:38:31 +01:00
|
|
|
test "pub enum" {
|
2021-05-04 19:23:22 +01:00
|
|
|
try pubEnumTest(other.APubEnum.Two);
|
2016-12-26 07:42:31 +00:00
|
|
|
}
|
2021-05-04 19:23:22 +01:00
|
|
|
fn pubEnumTest(foo: other.APubEnum) !void {
|
|
|
|
try expect(foo == other.APubEnum.Two);
|
2016-12-26 07:42:31 +00:00
|
|
|
}
|
|
|
|
|
2017-05-24 02:38:31 +01:00
|
|
|
test "cast with imported symbol" {
|
2021-05-04 19:23:22 +01:00
|
|
|
try expect(@as(other.size_t, 42) == 42);
|
2016-12-26 07:42:31 +00:00
|
|
|
}
|