mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-12-18 00:11:06 +00:00
Make them tests work now
This commit is contained in:
parent
5694c77d16
commit
a27b7ee6a5
2 changed files with 15 additions and 0 deletions
12
tests/xor.qc
12
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");
|
||||
}
|
||||
|
|
|
@ -5,3 +5,6 @@ C: -std=gmqcc
|
|||
E: $null
|
||||
M: 6
|
||||
M: 8
|
||||
M: commutative
|
||||
M: assocative
|
||||
M: inverse
|
||||
|
|
Loading…
Reference in a new issue