From a27b7ee6a5a84312a6281cda868503a00bbd4519 Mon Sep 17 00:00:00 2001 From: Dale Weiler Date: Sat, 15 Jun 2013 11:05:25 +0000 Subject: [PATCH] Make them tests work now --- tests/xor.qc | 12 ++++++++++++ tests/xor.tmpl | 3 +++ 2 files changed, 15 insertions(+) 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 -- 2.39.2