Updated tests to reflect the removal of sayhello() and printint()
git-svn-id: http://picoc.googlecode.com/svn/trunk@204 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
parent
207549bf17
commit
70d48e75d7
|
@ -1,5 +1,5 @@
|
||||||
sayhello();
|
printf("Hello\n");
|
||||||
sayhello(); /* this is a comment */ sayhello();
|
printf("Hello\n"); /* this is a comment */ printf("Hello\n");
|
||||||
sayhello();
|
printf("Hello\n");
|
||||||
// this is also a comment sayhello();
|
// this is also a comment sayhello();
|
||||||
sayhello();
|
printf("Hello\n");
|
||||||
|
|
|
@ -9,5 +9,5 @@ struct fred bloggs;
|
||||||
bloggs.boris = 12;
|
bloggs.boris = 12;
|
||||||
bloggs.natasha = 34;
|
bloggs.natasha = 34;
|
||||||
|
|
||||||
printint(bloggs.boris);
|
printf("%d\n", bloggs.boris);
|
||||||
printint(bloggs.natasha);
|
printf("%d\n", bloggs.natasha);
|
||||||
|
|
|
@ -2,5 +2,5 @@ int Count;
|
||||||
|
|
||||||
for (Count = 1; Count <= 10; Count++)
|
for (Count = 1; Count <= 10; Count++)
|
||||||
{
|
{
|
||||||
printint(Count);
|
printf("%d\n", Count);
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,5 +8,5 @@ for (Count = 1; Count <= 10; Count++)
|
||||||
|
|
||||||
for (Count = 0; Count < 10; Count++)
|
for (Count = 0; Count < 10; Count++)
|
||||||
{
|
{
|
||||||
printint(Array[Count]);
|
printf("%d\n", Array[Count]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,19 +2,19 @@ int Count;
|
||||||
|
|
||||||
for (Count = 0; Count < 4; Count++)
|
for (Count = 0; Count < 4; Count++)
|
||||||
{
|
{
|
||||||
printint(Count);
|
printf("%d\n", Count);
|
||||||
switch (Count)
|
switch (Count)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
printint(1);
|
printf("%d\n", 1);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
printint(2);
|
printf("%d\n", 2);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
printint(0);
|
printf("%d\n", 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@ int myfunc(int x)
|
||||||
return x * x;
|
return x * x;
|
||||||
}
|
}
|
||||||
|
|
||||||
printint(myfunc(3));
|
printf("%d\n", myfunc(3));
|
||||||
printint(myfunc(4));
|
printf("%d\n", myfunc(4));
|
||||||
|
|
||||||
void vfunc(int a)
|
void vfunc(int a)
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,7 +8,7 @@ t = 0;
|
||||||
|
|
||||||
while (a < 100)
|
while (a < 100)
|
||||||
{
|
{
|
||||||
printint(a);
|
printf("%d\n", a);
|
||||||
t = a;
|
t = a;
|
||||||
a = t + p;
|
a = t + p;
|
||||||
p = t;
|
p = t;
|
||||||
|
|
|
@ -8,7 +8,7 @@ t = 0;
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
printint(a);
|
printf("%d\n", a);
|
||||||
t = a;
|
t = a;
|
||||||
a = t + p;
|
a = t + p;
|
||||||
p = t;
|
p = t;
|
||||||
|
|
Loading…
Reference in a new issue