diff --git a/tests/xor.qc b/tests/xor.qc index 81fb114..2006944 100644 --- a/tests/xor.qc +++ b/tests/xor.qc @@ -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"); } diff --git a/tests/xor.tmpl b/tests/xor.tmpl index 681a982..0116161 100644 --- a/tests/xor.tmpl +++ b/tests/xor.tmpl @@ -5,3 +5,6 @@ C: -std=gmqcc E: $null M: 6 M: 8 +M: commutative +M: assocative +M: inverse