A more realistic preprocessor concatenation test.

This commit is contained in:
Dale Weiler 2013-04-21 06:52:22 +00:00
parent 6009e2b3ea
commit 96c0fa983d
2 changed files with 16 additions and 1 deletions

View file

@ -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))

View file

@ -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