Added test for variadic arguments
authorDale Weiler <killfieldengine@gmail.com>
Mon, 19 Nov 2012 02:11:24 +0000 (02:11 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Mon, 19 Nov 2012 02:11:24 +0000 (02:11 +0000)
tests/builtin.qc
tests/variadic.qc [new file with mode: 0644]
tests/variadic.tmpl [new file with mode: 0644]

index f4e509a..6e58644 100644 (file)
@@ -1,4 +1,4 @@
-void(...) print = #1;
+void(string) print = #1;
 
 void() main = {
     print("hello world");
diff --git a/tests/variadic.qc b/tests/variadic.qc
new file mode 100644 (file)
index 0000000..27d938f
--- /dev/null
@@ -0,0 +1,5 @@
+void(...) print = #1;
+
+void() main = {
+    print("hello", " world");
+}
diff --git a/tests/variadic.tmpl b/tests/variadic.tmpl
new file mode 100644 (file)
index 0000000..bba4920
--- /dev/null
@@ -0,0 +1,8 @@
+I: variadic.qc
+D: test variadic arguments
+T: -execute
+C: -std=gmqcc
+E: $null
+F: variadic arguments failed
+S: variadic arguments worked
+M: hello world