Mercurial > projects > ldc
view test/switch3.d @ 122:36ab367572df trunk
[svn r126] String switch is now implemented.
A few other fixes.
author | lindquist |
---|---|
date | Tue, 27 Nov 2007 09:19:07 +0100 |
parents | |
children | d9d5d59873d8 |
line wrap: on
line source
module switch3; void main() { char[] str = "hello"; int i; switch(str) { case "world": i = 1; assert(0); case "hello": i = 2; break; case "a","b","c": i = 3; assert(0); default: i = 4; assert(0); } assert(i == 2); printf("SUCCESS\n"); }