Add bitnot test for testsuite.

This commit is contained in:
Dale Weiler 2013-02-02 00:12:46 +00:00
parent ccdfd4c65a
commit 9bf8f9c505
2 changed files with 23 additions and 0 deletions

14
tests/bitnot.qc Normal file
View file

@ -0,0 +1,14 @@
void main() {
float a; a = 1;
float b; b = 1;
float c; c = 1;
float d; d = 1;
a &~= 1; // 0
b &= ~1; // 0
c &= ~d; // 0
print("a: ", ftos(a), "\nb: ",
ftos(b), "\nc: ",
ftos(c), "\n");
}

9
tests/bitnot.tmpl Normal file
View file

@ -0,0 +1,9 @@
# used to test the builtins
I: bitnot.qc
D: test bitwise not operators
T: -execute
C: -std=gmqcc
E: $null
M: a: 0
M: b: 0
M: c: 0