Added test case for switch/case/break

git-svn-id: http://picoc.googlecode.com/svn/trunk@84 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
zik.saleeba 2009-02-18 11:05:34 +00:00
parent 2f5523f400
commit 2caa072dec
3 changed files with 30 additions and 1 deletions

20
tests/06_case.c Normal file
View file

@ -0,0 +1,20 @@
int Count;
for (Count = 0; Count < 4; Count++)
{
printint(Count);
switch (Count)
{
case 1:
printint(1);
break;
case 2:
printint(2);
break;
default:
printint(0);
break;
}
}

8
tests/06_case.expect Normal file
View file

@ -0,0 +1,8 @@
0
0
1
1
2
2
3
0

View file

@ -3,7 +3,8 @@ TESTS= 00_assignment.test \
02_printf.test \
03_struct.test \
04_for.test \
05_array.test
05_array.test \
06_case.test
%.test: %.expect %.c
@echo Test: $*...