Add new tests for macro nesting
This commit is contained in:
parent
c2422ba87f
commit
91d4db600b
3 changed files with 13 additions and 1 deletions
10
tests/tests2/64_macro_nesting.c
Normal file
10
tests/tests2/64_macro_nesting.c
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#define CAT2(a,b) a##b
|
||||||
|
#define CAT(a,b) CAT2(a,b)
|
||||||
|
#define AB(x) CAT(x,y)
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
int xy = 42;
|
||||||
|
printf("%d\n", CAT(A,B)(x));
|
||||||
|
return 0;
|
||||||
|
}
|
1
tests/tests2/64_macro_nesting.expect
Normal file
1
tests/tests2/64_macro_nesting.expect
Normal file
|
@ -0,0 +1 @@
|
||||||
|
42
|
|
@ -78,7 +78,8 @@ TESTS = \
|
||||||
60_enum_redefinition.test \
|
60_enum_redefinition.test \
|
||||||
61_undefined_enum.test \
|
61_undefined_enum.test \
|
||||||
62_enumerator_redefinition.test \
|
62_enumerator_redefinition.test \
|
||||||
63_local_enumerator_redefinition.test
|
63_local_enumerator_redefinition.test \
|
||||||
|
64_macro_nesting.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
|
||||||
|
|
Loading…
Add table
Reference in a new issue