📄 bug-460444.c
字号:
/* bug 460444 */#include <testfwk.h>voidtestXOR(void){ volatile int p = 5; if (p ^ 0x60) { // Good. } else { FAIL(); } /* Test is to see if it compiles. */ ASSERT((p^0x60) == 0x65); ASSERT((p&0x61) == 0x01); ASSERT((p|0x60) == 0x65); p = 0x1234; if (p ^ 0x5678) { // Good. } else { FAIL(); } if (p & 0x4324) { // Good } else { FAIL(); } if (p | 0x1279) { // Good } else { FAIL(); }}voidtestLeftRightXor(void){ volatile int left, right; left = 0x123; right = 0x8101; if (left ^ right) { // Good } else { FAIL(); } if (left & right) { // Good } else { FAIL(); } if (left | right) { // Good } else { FAIL(); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -