glcpp: Extend the invalid-paste test
The current code lets a few invalid pastes through, such as an string pasted onto the end of an integer. Extend the invalid-paste test to catch some of these. Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
@@ -1,2 +1,7 @@
|
|||||||
#define PASTE(x,y) x ## y
|
#define PASTE(x,y) x ## y
|
||||||
PASTE(<,>)
|
PASTE(<,>)
|
||||||
|
PASTE(0,abc)
|
||||||
|
PASTE(1,=)
|
||||||
|
PASTE(2,@)
|
||||||
|
PASTE(3,-4)
|
||||||
|
PASTE(4,+5.2)
|
||||||
|
@@ -1,5 +1,20 @@
|
|||||||
0:2(7): preprocessor error:
|
0:2(7): preprocessor error:
|
||||||
Pasting "<" and ">" does not give a valid preprocessing token.
|
Pasting "<" and ">" does not give a valid preprocessing token.
|
||||||
|
0:3(7): preprocessor error:
|
||||||
|
Pasting "0" and "abc" does not give a valid preprocessing token.
|
||||||
|
0:4(7): preprocessor error:
|
||||||
|
Pasting "1" and "=" does not give a valid preprocessing token.
|
||||||
|
0:5(7): preprocessor error:
|
||||||
|
Pasting "2" and "@" does not give a valid preprocessing token.
|
||||||
|
0:6(7): preprocessor error:
|
||||||
|
Pasting "3" and "-" does not give a valid preprocessing token.
|
||||||
|
0:7(7): preprocessor error:
|
||||||
|
Pasting "4" and "+" does not give a valid preprocessing token.
|
||||||
|
|
||||||
<
|
<
|
||||||
|
0
|
||||||
|
1
|
||||||
|
2
|
||||||
|
34
|
||||||
|
45.2
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user