mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-21 02:40:56 +00:00
A more realistic preprocessor concatenation test.
This commit is contained in:
parent
6009e2b3ea
commit
96c0fa983d
2 changed files with 16 additions and 1 deletions
|
@ -1,2 +1,13 @@
|
|||
#define CAT(X, Y) X##Y
|
||||
CAT(hello, world)
|
||||
|
||||
#define REDIR(X, Y) CAT(X, Y)
|
||||
REDIR(CAT(hello, world), CAT(world, hello))
|
||||
|
||||
#define SCONS(X, ...) REDIR(X, __VA_ARGS__)
|
||||
SCONS(hello, world)
|
||||
|
||||
#define FOO(X) X##X
|
||||
#define BAR(X) FOO(X)##FOO(X)
|
||||
|
||||
REDIR(BAR(hello), BAR(world))
|
||||
|
|
|
@ -2,5 +2,9 @@ I: ppcat.qc
|
|||
D: test preprocessor concatenation
|
||||
T: -pp
|
||||
C: -std=gmqcc
|
||||
M: helloworld
|
||||
F: -no-defs
|
||||
M: helloworld
|
||||
M: helloworldworldhello
|
||||
M: helloworld
|
||||
M: hellohellohellohelloworldworldworldworld
|
||||
|
||||
|
|
Loading…
Reference in a new issue