Added struct test

git-svn-id: http://picoc.googlecode.com/svn/trunk@68 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
zik.saleeba 2009-02-10 06:17:28 +00:00
parent d6a7ac7c14
commit 3a2c0552d6
3 changed files with 18 additions and 1 deletions

13
test/03_struct.c Normal file
View file

@ -0,0 +1,13 @@
struct fred
{
int boris;
int natasha;
};
struct fred bloggs;
bloggs.boris = 12;
bloggs.natasha = 34;
printint(bloggs.boris);
printint(bloggs.natasha);

2
test/03_struct.expect Normal file
View file

@ -0,0 +1,2 @@
12
34

View file

@ -1,6 +1,7 @@
TESTS= 00_assignment.test \
01_comment.test \
02_printf.test
02_printf.test \
03_struct.test
%.test: %.expect %.c ../picoc
@echo Test: $*...
@ -9,6 +10,7 @@ TESTS= 00_assignment.test \
then \
echo "error in test $*"; \
diff -u $*.expect $*.output; \
rm -f $*.output; \
exit 1; \
fi; \
rm -f $*.output