Added missing tests

git-svn-id: http://picoc.googlecode.com/svn/trunk@178 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
zik.saleeba 2009-03-09 00:49:01 +00:00
parent 1fd07ea9a2
commit 460a8df81f
4 changed files with 27 additions and 0 deletions

13
tests/14_if.c Normal file
View file

@ -0,0 +1,13 @@
int a = 1;
if (a)
printf("a is true\n");
else
printf("a is false\n");
int b = 0;
if (b)
printf("b is true\n");
else
printf("b is false\n");

2
tests/14_if.expect Normal file
View file

@ -0,0 +1,2 @@
a is true
b is false

10
tests/15_recursion.c Normal file
View file

@ -0,0 +1,10 @@
int fact(int i) {
if (i < 2) {
return i;
}
return (i * fact(i - 1));
}
fact(5)
fact(6)

View file

@ -0,0 +1,2 @@
120
720