Files
ldc/test/switch3.d
Tomas Lindquist Olsen 0665531549 [svn r126] String switch is now implemented.
A few other fixes.
2007-11-27 09:19:07 +01:00

25 lines
346 B
D

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");
}