]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
Add a test for function accumulation attribute
authorDale Weiler <killfieldengine@gmail.com>
Thu, 17 Oct 2013 07:43:05 +0000 (03:43 -0400)
committerDale Weiler <killfieldengine@gmail.com>
Thu, 17 Oct 2013 07:43:05 +0000 (03:43 -0400)
tests/accumulate.qc [new file with mode: 0644]
tests/accumulate.tmpl [new file with mode: 0644]

diff --git a/tests/accumulate.qc b/tests/accumulate.qc
new file mode 100644 (file)
index 0000000..008626d
--- /dev/null
@@ -0,0 +1,15 @@
+void foo() {
+    print("hello ");
+}
+
+[[accumulate]] void foo() {
+    print("accumulation ");
+}
+
+[[accumulate]] void foo() {
+    print("world\n");
+}
+
+void main() {
+    foo();
+}
diff --git a/tests/accumulate.tmpl b/tests/accumulate.tmpl
new file mode 100644 (file)
index 0000000..a0d6bae
--- /dev/null
@@ -0,0 +1,5 @@
+I: accumulate.qc
+D: test function accumulation
+T: -execute
+C: -std=gmqcc
+M: hello accumulation world