From: Wolfgang Bumiller Date: Wed, 2 Jan 2013 13:16:42 +0000 (+0100) Subject: tests for __VA_ARGS__ X-Git-Tag: before-library~393 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8331a2982dd354be121a803479b68e1128582726;p=xonotic%2Fgmqcc.git tests for __VA_ARGS__ --- diff --git a/tests/pp_va_args.qc b/tests/pp_va_args.qc new file mode 100644 index 0000000..f73372c --- /dev/null +++ b/tests/pp_va_args.qc @@ -0,0 +1,9 @@ +void print(...) = #1; + +#define NOPARENS(...) __VA_ARGS__ +#define callem(func, args) func(NOPARENS args) + +void main() { + print(NOPARENS("hello ", "world\n")); + callem(print, ("Yay", ", there\n")); +} diff --git a/tests/pp_va_args.tmpl b/tests/pp_va_args.tmpl new file mode 100644 index 0000000..cf6ed16 --- /dev/null +++ b/tests/pp_va_args.tmpl @@ -0,0 +1,6 @@ +I: pp_va_args.qc +D: __VA_ARGS__ +T: -execute +C: -std=fteqcc +M: hello world +M: Yay, there