From: Dale Weiler Date: Sun, 21 Apr 2013 06:52:22 +0000 (+0000) Subject: A more realistic preprocessor concatenation test. X-Git-Tag: before-library~35 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=96c0fa983d44a8328ede891be0972c6f060be997;p=xonotic%2Fgmqcc.git A more realistic preprocessor concatenation test. --- diff --git a/tests/ppcat.qc b/tests/ppcat.qc index 2056632..ca92060 100644 --- a/tests/ppcat.qc +++ b/tests/ppcat.qc @@ -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)) diff --git a/tests/ppcat.tmpl b/tests/ppcat.tmpl index 8f28fdb..0844a8d 100644 --- a/tests/ppcat.tmpl +++ b/tests/ppcat.tmpl @@ -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 +