aboutsummaryrefslogtreecommitdiff
path: root/test/run_tests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/run_tests.cpp')
-rw-r--r--test/run_tests.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/run_tests.cpp b/test/run_tests.cpp
index 6858cf1bbc..159124609e 100644
--- a/test/run_tests.cpp
+++ b/test/run_tests.cpp
@@ -1031,6 +1031,19 @@ fn print_ok(val: #typeof(x)) -> #typeof(foo) {
}
const foo : i32 = 0;
)SOURCE", "OK\n");
+
+ add_simple_case("enum with void types", R"SOURCE(
+use "std.zig";
+enum Foo { A, B, C, D, }
+pub fn main(argc: isize, argv: &&u8, env: &&u8) -> i32 {
+ const foo : Foo = Foo.B;
+ if (foo != Foo.B) {
+ print_str("BAD\n");
+ }
+ print_str("OK\n");
+ return 0;
+}
+ )SOURCE", "OK\n");
}