]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
Typedef testcases
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 25 Nov 2012 14:33:03 +0000 (15:33 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 25 Nov 2012 14:33:03 +0000 (15:33 +0100)
tests/typedefs.qc [new file with mode: 0644]
tests/typedefs.tmpl [new file with mode: 0644]

diff --git a/tests/typedefs.qc b/tests/typedefs.qc
new file mode 100644 (file)
index 0000000..79143fd
--- /dev/null
@@ -0,0 +1,12 @@
+typedef void(string, ...) ptype;
+typedef string(float) funcsf;
+
+ptype print = #1;
+funcsf ftos = #2;
+
+void main() {
+    typedef float funcsf;
+    funcsf a;
+    a = 0;
+    print("A typedeffed function, 0=", ftos(a), "\n");
+}
diff --git a/tests/typedefs.tmpl b/tests/typedefs.tmpl
new file mode 100644 (file)
index 0000000..4aa8ee2
--- /dev/null
@@ -0,0 +1,5 @@
+I: typtedefs.qc
+D: typedefs
+T: -execute
+C: -std=fteqcc
+M: A typedeffed function, 0=0