mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-20 18:32:01 +00:00
Add bitnot test for testsuite.
This commit is contained in:
parent
ccdfd4c65a
commit
9bf8f9c505
2 changed files with 23 additions and 0 deletions
14
tests/bitnot.qc
Normal file
14
tests/bitnot.qc
Normal 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
9
tests/bitnot.tmpl
Normal 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
|
Loading…
Reference in a new issue