]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Added counter-stability test to the varargs testcase
authorWolfgang Bumiller <blub@speed.at>
Thu, 17 Jan 2013 09:32:43 +0000 (10:32 +0100)
committerWolfgang Bumiller <blub@speed.at>
Thu, 17 Jan 2013 09:32:43 +0000 (10:32 +0100)
tests/varargs.qc
tests/varargs.tmpl

index ffe7d1b6b34b152ffa9b2a12751f6302464a0f70..89cb5b8d6bf5c35781965177441ae6dca756d326 100644 (file)
@@ -9,6 +9,15 @@ void nbva(float a, string...count) {
         print("Vararg ", ftos(a), " = ", ...(a, string), "\n");
 }
 
+var void unstable(...);
+void stability(float a, float b, ...count)
+{
+    print("Got: ", ftos(count), "\n");
+}
+
 void main() {
     nbva(1, "Hello", "You", "There");
+    stability(1, 2, 3, 4, 5);
+    unstable = stability;
+    unstable(1, 2, 3, 4, 5);
 }
index d8130a83ba083644d79183d271f7e23518c16aaa..29de939ea8a4ad9ee2f16ac01ae08dbbe02a18f2 100644 (file)
@@ -8,3 +8,5 @@ M: You chose: You
 M: Vararg 0 = Hello
 M: Vararg 1 = You
 M: Vararg 2 = There
+M: Got: 3
+M: Got: 3