Add bitnot test for testsuite.
authorDale Weiler <killfieldengine@gmail.com>
Sat, 2 Feb 2013 00:12:46 +0000 (00:12 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Sat, 2 Feb 2013 00:12:46 +0000 (00:12 +0000)
tests/bitnot.qc [new file with mode: 0644]
tests/bitnot.tmpl [new file with mode: 0644]

diff --git a/tests/bitnot.qc b/tests/bitnot.qc
new file mode 100644 (file)
index 0000000..c6e875d
--- /dev/null
@@ -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 (file)
index 0000000..75ae64a
--- /dev/null
@@ -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