Add tests for previous fixes

Add tests for the fixes made in commits
76cb1144ef,
a465b7f58f,
0f522fb32a,
82969f045c and
673befd2d7.
This commit is contained in:
Thomas Preud'homme
2014-03-30 12:56:55 +08:00
parent fdc31e152b
commit 80811671d4
11 changed files with 30 additions and 1 deletions
+9
View File
@@ -0,0 +1,9 @@
int f(void)
{
return 0;
}
int f(void)
{
return 1;
}
@@ -0,0 +1 @@
58_function_redefinition.c:7: error: redefinition of 'f'
+1
View File
@@ -0,0 +1 @@
int (*fct)[42](int x);
+1
View File
@@ -0,0 +1 @@
59_function_array.c:1: error: declaration of an array of functions
+4
View File
@@ -0,0 +1,4 @@
enum color {RED, GREEN, BLUE};
enum color {R, G, B};
enum color c;
+1
View File
@@ -0,0 +1 @@
60_enum_redefinition.c:2: error: struct/union/enum already defined
+1
View File
@@ -0,0 +1 @@
enum rgb c = 42;
+1
View File
@@ -0,0 +1 @@
61_undefined_enum.c:1: error: unknown struct/union/enum
@@ -0,0 +1,4 @@
enum color {RED, GREEN, BLUE};
enum rgb {RED, G, B};
enum color c = RED;
@@ -0,0 +1 @@
62_enumerator_redefinition.c:2: error: redefinition of enumerator 'RED'
+6 -1
View File
@@ -69,7 +69,12 @@ TESTS = \
54_goto.test \ 54_goto.test \
55_lshift_type.test \ 55_lshift_type.test \
56_btype_excess-1.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 # 30_hanoi.test -- seg fault in the code, gcc as well
# 34_array_assignment.test -- array assignment is not in C standard # 34_array_assignment.test -- array assignment is not in C standard