From 8331a2982dd354be121a803479b68e1128582726 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Wed, 2 Jan 2013 14:16:42 +0100 Subject: [PATCH] tests for __VA_ARGS__ --- tests/pp_va_args.qc | 9 +++++++++ tests/pp_va_args.tmpl | 6 ++++++ 2 files changed, 15 insertions(+) create mode 100644 tests/pp_va_args.qc create mode 100644 tests/pp_va_args.tmpl 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 -- 2.39.2