diff options
Diffstat (limited to 'tests/conformance/4-statements/switch_no_match_no_default.zc')
| -rw-r--r-- | tests/conformance/4-statements/switch_no_match_no_default.zc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/conformance/4-statements/switch_no_match_no_default.zc b/tests/conformance/4-statements/switch_no_match_no_default.zc new file mode 100644 index 0000000..54c2016 --- /dev/null +++ b/tests/conformance/4-statements/switch_no_match_no_default.zc @@ -0,0 +1,12 @@ +// expect: after/ +// spec 4.7.1 +include rt; +void pn(int x) { rt.put_n(x); rt.put_c(10); } +void ps(char* s) { rt.put_s(s); rt.put_c(10); } +fn main() { + int k = 5; + switch (k) { case 1: ps("one"); case 2: ps("two"); } + ps("after"); + return 0; +} +// zc0: skip |
