Add tests for previous fixes

Add tests for the fixes made in commits
76cb1144ef,
a465b7f58f,
0f522fb32a,
82969f045c and
673befd2d7.
master
Thomas Preud'homme 2014-03-30 12:55:32 +08:00
parent fdc31e152b
commit 80811671d4
11 changed files with 30 additions and 1 deletions

View File

@ -0,0 +1,9 @@
int f(void)
{
return 0;
}
int f(void)
{
return 1;
}

View File

@ -0,0 +1 @@
58_function_redefinition.c:7: error: redefinition of 'f'

View File

@ -0,0 +1 @@
int (*fct)[42](int x);

View File

@ -0,0 +1 @@
59_function_array.c:1: error: declaration of an array of functions

View File

@ -0,0 +1,4 @@
enum color {RED, GREEN, BLUE};
enum color {R, G, B};
enum color c;

View File

@ -0,0 +1 @@
60_enum_redefinition.c:2: error: struct/union/enum already defined

View File

@ -0,0 +1 @@
enum rgb c = 42;

View File

@ -0,0 +1 @@
61_undefined_enum.c:1: error: unknown struct/union/enum

View File

@ -0,0 +1,4 @@
enum color {RED, GREEN, BLUE};
enum rgb {RED, G, B};
enum color c = RED;

View File

@ -0,0 +1 @@
62_enumerator_redefinition.c:2: error: redefinition of enumerator 'RED'

View File

@ -69,7 +69,12 @@ TESTS = \
54_goto.test \
55_lshift_type.test \
56_btype_excess-1.test \
57_btype_excess-2.test
57_btype_excess-2.test \
58_function_redefinition.test \
59_function_array.test \
60_enum_redefinition.test \
61_undefined_enum.test \
62_enumerator_redefinition.test
# 30_hanoi.test -- seg fault in the code, gcc as well
# 34_array_assignment.test -- array assignment is not in C standard