mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-03-22 10:41:43 +00:00
tests for __VA_ARGS__
This commit is contained in:
parent
38a664ed72
commit
8331a2982d
2 changed files with 15 additions and 0 deletions
9
tests/pp_va_args.qc
Normal file
9
tests/pp_va_args.qc
Normal 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
6
tests/pp_va_args.tmpl
Normal file
|
@ -0,0 +1,6 @@
|
|||
I: pp_va_args.qc
|
||||
D: __VA_ARGS__
|
||||
T: -execute
|
||||
C: -std=fteqcc
|
||||
M: hello world
|
||||
M: Yay, there
|
Loading…
Reference in a new issue