Added test for unnamed enums
git-svn-id: http://picoc.googlecode.com/svn/trunk@554 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
parent
6b31113511
commit
72b7c7de0b
24
tests/52_unnamed_enum.c
Normal file
24
tests/52_unnamed_enum.c
Normal file
|
@ -0,0 +1,24 @@
|
|||
#include <stdio.h>
|
||||
|
||||
enum fred { a, b, c };
|
||||
|
||||
printf("a=%d\n", a);
|
||||
printf("b=%d\n", b);
|
||||
printf("c=%d\n", c);
|
||||
|
||||
enum fred d;
|
||||
|
||||
typedef enum { e, f, g } h;
|
||||
typedef enum { i, j, k } m;
|
||||
|
||||
printf("e=%d\n", e);
|
||||
printf("f=%d\n", f);
|
||||
printf("g=%d\n", g);
|
||||
|
||||
printf("i=%d\n", i);
|
||||
printf("j=%d\n", j);
|
||||
printf("k=%d\n", k);
|
||||
|
||||
void main()
|
||||
{
|
||||
}
|
9
tests/52_unnamed_enum.expect
Normal file
9
tests/52_unnamed_enum.expect
Normal file
|
@ -0,0 +1,9 @@
|
|||
a=0
|
||||
b=1
|
||||
c=2
|
||||
e=0
|
||||
f=1
|
||||
g=2
|
||||
i=0
|
||||
j=1
|
||||
k=2
|
|
@ -46,7 +46,8 @@ TESTS= 00_assignment.test \
|
|||
48_nested_break.test \
|
||||
49_bracket_evaluation.test \
|
||||
50_logical_second_arg.test \
|
||||
51_static.test
|
||||
51_static.test \
|
||||
52_unnamed_enum.test
|
||||
|
||||
%.test: %.expect %.c
|
||||
@echo Test: $*...
|
||||
|
|
Loading…
Reference in a new issue