From aaa62eda727e5f878a7946e22ea294bde9a8364f Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 11 Jan 2016 01:15:17 -0700 Subject: simple enum support --- test/run_tests.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/run_tests.cpp') 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"); } -- cgit v1.2.3