]> git.xonotic.org Git - voretournament/voretournament.git/blobdiff - misc/source/gmqcc-src/tests/break.qc
By fteqcc, hello gmqcc
[voretournament/voretournament.git] / misc / source / gmqcc-src / tests / break.qc
diff --git a/misc/source/gmqcc-src/tests/break.qc b/misc/source/gmqcc-src/tests/break.qc
new file mode 100644 (file)
index 0000000..46f1805
--- /dev/null
@@ -0,0 +1,23 @@
+void test(float brkat, float contat) {
+    float i;
+
+    for (i = 0; i < 10; i += 1) {
+        if (i == contat) {
+            print("ct ");
+            continue;
+        }
+        print(ftos(i), " ");
+        if (i == brkat) {
+            print("brk ");
+            break;
+        }
+    }
+    print("end\n");
+}
+
+void main() {
+    test(-1, -1);
+    test( 3, -1);
+    test(-1,  3);
+    test( 5,  2);
+}