mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
Add test of bitwise operators and octal/hexadecimal literals.
This new test covers several features from the last few commits. This test passes already.
This commit is contained in:
parent
03f6d5d2d4
commit
bb9315f804
1 changed files with 20 additions and 0 deletions
20
tests/052-if-bitwise.c
Normal file
20
tests/052-if-bitwise.c
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Reference in a new issue