From: Dale Weiler Date: Sat, 15 Jun 2013 11:05:25 +0000 (+0000) Subject: Make them tests work now X-Git-Tag: v0.3.0~123 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a27b7ee6a5a84312a6281cda868503a00bbd4519;p=xonotic%2Fgmqcc.git Make them tests work now --- 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