Added struct test
git-svn-id: http://picoc.googlecode.com/svn/trunk@68 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
parent
d6a7ac7c14
commit
3a2c0552d6
13
test/03_struct.c
Normal file
13
test/03_struct.c
Normal 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
2
test/03_struct.expect
Normal file
|
@ -0,0 +1,2 @@
|
|||
12
|
||||
34
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue