From: Wolfgang Bumiller Date: Thu, 17 Jan 2013 09:32:43 +0000 (+0100) Subject: Added counter-stability test to the varargs testcase X-Git-Tag: before-library~238 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=8697fa59f3d05725568a90905d6d4b3a3de4ae79;p=xonotic%2Fgmqcc.git Added counter-stability test to the varargs testcase --- diff --git a/tests/varargs.qc b/tests/varargs.qc index ffe7d1b..89cb5b8 100644 --- a/tests/varargs.qc +++ b/tests/varargs.qc @@ -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); } diff --git a/tests/varargs.tmpl b/tests/varargs.tmpl index d8130a8..29de939 100644 --- a/tests/varargs.tmpl +++ b/tests/varargs.tmpl @@ -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