From: Dale Weiler Date: Sat, 2 Feb 2013 00:12:46 +0000 (+0000) Subject: Add bitnot test for testsuite. X-Git-Tag: before-library~172 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9bf8f9c50589e8dcd7ff175f6d13164fdd22fa6e;p=xonotic%2Fgmqcc.git Add bitnot test for testsuite. --- diff --git a/tests/bitnot.qc b/tests/bitnot.qc new file mode 100644 index 0000000..c6e875d --- /dev/null +++ b/tests/bitnot.qc @@ -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"); +} diff --git a/tests/bitnot.tmpl b/tests/bitnot.tmpl new file mode 100644 index 0000000..75ae64a --- /dev/null +++ b/tests/bitnot.tmpl @@ -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