A more realistic preprocessor concatenation test.
authorDale Weiler <killfieldengine@gmail.com>
Sun, 21 Apr 2013 06:52:22 +0000 (06:52 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Sun, 21 Apr 2013 06:52:22 +0000 (06:52 +0000)
tests/ppcat.qc
tests/ppcat.tmpl

index 2056632054591fb7c86c781da3d38f07e3e04488..ca92060d2005d71570aac8827eab4713296a9e68 100644 (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))
index 8f28fdb5d5601b7c75be35ac0870beb39b29c8b8..0844a8d5d85de00ce6587abe0ca3512d4e15f2b8 100644 (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
+