diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-01-11 01:15:17 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-01-11 01:15:17 -0700 |
| commit | aaa62eda727e5f878a7946e22ea294bde9a8364f (patch) | |
| tree | aab920d548670f0d0505f5e3bf4d920ea2df1b9f /test | |
| parent | 2061cd50c0ec6cfcac60ea98f49e4333a4f508f1 (diff) | |
| download | zig-aaa62eda727e5f878a7946e22ea294bde9a8364f.tar.gz zig-aaa62eda727e5f878a7946e22ea294bde9a8364f.zip | |
simple enum support
Diffstat (limited to 'test')
| -rw-r--r-- | test/run_tests.cpp | 13 |
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"); } |
