diff options
author | Carl Worth <cworth@cworth.org> | 2010-05-24 11:30:06 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2010-05-24 11:33:07 -0700 |
commit | bb9315f8047770585391c56973ef26c30f74d603 (patch) | |
tree | 7ca0a56d7ffd8865fa1989cc45dca1b540733904 | |
parent | 03f6d5d2d4a6c42a197ee8eb4e26b87c87bbe43e (diff) |
Add test of bitwise operators and octal/hexadecimal literals.
This new test covers several features from the last few commits.
This test passes already.
-rw-r--r-- | tests/052-if-bitwise.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/052-if-bitwise.c b/tests/052-if-bitwise.c new file mode 100644 index 0000000000..2d8e45eb61 --- /dev/null +++ b/tests/052-if-bitwise.c @@ -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 |