Add test of bitwise operators and octal/hexadecimal literals.
authorCarl Worth <cworth@cworth.org>
Mon, 24 May 2010 18:30:06 +0000 (11:30 -0700)
committerCarl Worth <cworth@cworth.org>
Mon, 24 May 2010 18:33:07 +0000 (11:33 -0700)
This new test covers several features from the last few commits.

This test passes already.

tests/052-if-bitwise.c [new file with mode: 0644]

diff --git a/tests/052-if-bitwise.c b/tests/052-if-bitwise.c
new file mode 100644 (file)
index 0000000..2d8e45e
--- /dev/null
@@ -0,0 +1,20 @@
+#if (0xaaaaaaaa | 0x55555555) != 4294967295
+failure_1
+#else
+success_1
+#endif
+#if (0x12345678 ^ 0xfdecba98) == 4023971040
+success_2
+#else
+failure_2
+#endif
+#if (~ 0xdeadbeef) != -3735928560
+failure_3
+#else
+success_3
+#endif
+#if (0667 & 0733) == 403
+success_4
+#else
+failure_4
+#endif