From 9bf8f9c50589e8dcd7ff175f6d13164fdd22fa6e Mon Sep 17 00:00:00 2001 From: Dale Weiler Date: Sat, 2 Feb 2013 00:12:46 +0000 Subject: [PATCH] Add bitnot test for testsuite. --- tests/bitnot.qc | 14 ++++++++++++++ tests/bitnot.tmpl | 9 +++++++++ 2 files changed, 23 insertions(+) create mode 100644 tests/bitnot.qc create mode 100644 tests/bitnot.tmpl 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 -- 2.39.2