tests for __VA_ARGS__

This commit is contained in:
Wolfgang Bumiller 2013-01-02 14:16:42 +01:00
parent 38a664ed72
commit 8331a2982d
2 changed files with 15 additions and 0 deletions

9
tests/pp_va_args.qc Normal file
View file

@ -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"));
}

6
tests/pp_va_args.tmpl Normal file
View file

@ -0,0 +1,6 @@
I: pp_va_args.qc
D: __VA_ARGS__
T: -execute
C: -std=fteqcc
M: hello world
M: Yay, there