diff options
Diffstat (limited to 'tests/programs/enumscope.zc')
| -rw-r--r-- | tests/programs/enumscope.zc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/programs/enumscope.zc b/tests/programs/enumscope.zc index 5c6d7d0..6c66ee8 100644 --- a/tests/programs/enumscope.zc +++ b/tests/programs/enumscope.zc @@ -1,9 +1,12 @@ +namespace; +include rt; + // enum members are reached through the enum's name as well as plainly enum color { RED, GREEN = 5, BLUE }; fn main() { int c = color.BLUE; - put_n(color.RED); put_c(' '); put_n(GREEN); put_c(' '); - put_n(c); put_c(' '); - switch (c) { case color.BLUE: put_s("blue"); break; default: put_s("other"); } + rt.put_n(color.RED); rt.put_c(' '); rt.put_n(GREEN); rt.put_c(' '); + rt.put_n(c); rt.put_c(' '); + switch (c) { case color.BLUE: rt.put_s("blue"); break; default: rt.put_s("other"); } return 0; } |
