]> de.git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Make them tests work now
authorDale Weiler <killfieldengine@gmail.com>
Sat, 15 Jun 2013 11:05:25 +0000 (11:05 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Sat, 15 Jun 2013 11:05:25 +0000 (11:05 +0000)
tests/xor.qc
tests/xor.tmpl

index 81fb1149e5c4c94762f7ddb3ef7e0f9c12773a71..2006944ef1f0b37a1c87a5cf45e98a4092ee1a42 100644 (file)
@@ -9,4 +9,16 @@ void main() {
     
     print(ftos(z), "\n");
     print(ftos(c), "\n");
+    
+    // commutative?
+    if (x ^ y == y ^ x)
+        print("commutative\n");
+    
+    // assocative?
+    if (x ^ (y ^ z) == (x ^ y) ^ z)
+        print("assocative\n");
+        
+    // elements are their own inverse?
+    if (x ^ 0 == x)
+        print("inverse\n");
 }
index 681a9826808f31926f656dad2cac52eb945f58cb..0116161d808f79028c2cad6f9c8d748781c1147f 100644 (file)
@@ -5,3 +5,6 @@ C: -std=gmqcc
 E: $null
 M: 6
 M: 8
+M: commutative
+M: assocative
+M: inverse