Commit 7a7f83033c

Andrew Kelley <superjoe30@gmail.com>
2016-04-20 02:19:18
add test for public enums
See #5
1 parent 4e37fb2
Changed files (2)
test/other.zig
@@ -0,0 +1,5 @@
+pub enum APubEnum {
+    One,
+    Two,
+    Three,
+}
test/self_hosted.zig
@@ -1,7 +1,7 @@
-// test std library
 const std = @import("std");
 const assert = std.assert;
 const str = std.str;
+const other = @import("other.zig");
 
 #attribute("test")
 fn empty_function() {}
@@ -1244,3 +1244,11 @@ fn test3_2(f: Test3Foo) {
 }
 
 
+
+#attribute("test")
+fn pub_enum() {
+    pub_enum_test(other.APubEnum.Two);
+}
+fn pub_enum_test(foo: other.APubEnum) {
+    assert(foo == other.APubEnum.Two);
+}