7 static unsigned short buf
[] = {0x8765, 0xa5a5, 0xc3c3, 0xf0f0, 0xabcd};
11 unsigned char *p
= ((unsigned char *) buf
) + 4;
12 ASSERT (*((unsigned char *) (p
+ 2 - 4)) == 0xa5);
13 ASSERT (*((unsigned char *) (p
- 2)) == 0xa5);
14 ASSERT (*((unsigned short *) (p
+ 3 - 7)) == 0x8765);
15 ASSERT (*((unsigned short *) (p
- 4)) == 0x8765);
16 ASSERT (*((unsigned char *) (p
- 2 + 4)) == 0xf0);
17 ASSERT (*((unsigned char *) (p
+ 2)) == 0xf0);
18 ASSERT (*((unsigned short *) (p
- 3 + 7)) == 0xabcd);
19 ASSERT (*((unsigned short *) (p
+ 4)) == 0xabcd);