authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-04-19 17:19:18-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2016-04-19 17:20:23-07:00
log7a7f83033c3fee3e92046b76dd33b9f8ded4f0fd
tree7cf7451ce0809bc59961325d338e6b4b1d2b07fe
parent4e37fb2fa244e350b4e248332848d40594eee820

add test for public enums

See #5

2 files changed, 14 insertions(+), 1 deletions(-)

test/other.zig created+5
......@@ -0,0 +1,5 @@
1pub enum APubEnum {
2 One,
3 Two,
4 Three,
5}
test/self_hosted.zig+9-1
......@@ -1,7 +1,7 @@
1// test std library
21const std = @import("std");
32const assert = std.assert;
43const str = std.str;
4const other = @import("other.zig");
55
66#attribute("test")
77fn empty_function() {}
......@@ -1244,3 +1244,11 @@ fn test3_2(f: Test3Foo) {
12441244}
12451245
12461246
1247
1248#attribute("test")
1249fn pub_enum() {
1250 pub_enum_test(other.APubEnum.Two);
1251}
1252fn pub_enum_test(foo: other.APubEnum) {
1253 assert(foo == other.APubEnum.Two);
1254}