]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - tests/switch.qc
Rewrite constant folder in C++
[xonotic/gmqcc.git] / tests / switch.qc
index c6396c5b117e0ac968aca825ab749c6a8f4fc9a1..2e9cf8edd5f7db3e24769e1db90ca16ff1f2f39c 100644 (file)
@@ -1,7 +1,4 @@
-void print(...) = #1;
-string ftos(float) = #2;
-
-void main(float param, float p2) {
+void test(float param, float p2) {
     float i;
     float c80 = 80;
     switch(param) {
@@ -25,3 +22,14 @@ void main(float param, float p2) {
             print(ftos(i), "\n");
     }
 }
+
+void main() {
+    test(1,  0);
+    test(2,  0);
+    test(3,  0);
+    test(4,  0);
+    test(5,  0);
+    test(80, 0);
+    test(99, 0);
+    test(99, 6);
+}