]> de.git.xonotic.org Git - voretournament/voretournament.git/blobdiff - misc/source/gmqcc-src/tests/correct-vs-short.qc
By fteqcc, hello gmqcc
[voretournament/voretournament.git] / misc / source / gmqcc-src / tests / correct-vs-short.qc
diff --git a/misc/source/gmqcc-src/tests/correct-vs-short.qc b/misc/source/gmqcc-src/tests/correct-vs-short.qc
new file mode 100644 (file)
index 0000000..e7cd2dc
--- /dev/null
@@ -0,0 +1,18 @@
+void test(vector a, vector b) {
+    print(ftos((a && b) + (a && b)), " ");
+    print(ftos((a || b) + (a || b)), " ");
+    print(ftos((a && b) + (a || b)), "\n");
+}
+
+void main() {
+    print("X               & | B\n");
+    print("0 0 0, 0 0 0 :: "); test('0 0 0', '0 0 0');
+    print("0 0 0, 5 0 0 :: "); test('0 0 0', '5 0 0');
+    print("5 0 0, 0 0 0 :: "); test('5 0 0', '0 0 0');
+    print("5 0 0, 5 0 0 :: "); test('5 0 0', '5 0 0');
+    print("Y               & | B\n");
+    print("0 0 0, 0 0 0 :: "); test('0 0 0', '0 0 0');
+    print("0 0 0, 0 5 0 :: "); test('0 0 0', '0 5 0');
+    print("0 5 0, 0 0 0 :: "); test('0 5 0', '0 0 0');
+    print("0 5 0, 0 5 0 :: "); test('0 5 0', '0 5 0');
+}