]> de.git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
tests for __VA_ARGS__
authorWolfgang Bumiller <blub@speed.at>
Wed, 2 Jan 2013 13:16:42 +0000 (14:16 +0100)
committerWolfgang Bumiller <blub@speed.at>
Wed, 2 Jan 2013 13:16:42 +0000 (14:16 +0100)
tests/pp_va_args.qc [new file with mode: 0644]
tests/pp_va_args.tmpl [new file with mode: 0644]

diff --git a/tests/pp_va_args.qc b/tests/pp_va_args.qc
new file mode 100644 (file)
index 0000000..f73372c
--- /dev/null
@@ -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 (file)
index 0000000..cf6ed16
--- /dev/null
@@ -0,0 +1,6 @@
+I: pp_va_args.qc
+D: __VA_ARGS__
+T: -execute
+C: -std=fteqcc
+M: hello world
+M: Yay, there