Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git] / sdcc / support / regression / tests / getbyte_param.c
blob7cb478e48ec2e2b0f57e5005805e8bfd09f81a0f
1 /** getbyte_param.c - test for bug #3269
2 */
3 #include <testfwk.h>
4 #include <stdlib.h>
6 void
7 fCheckPlus (unsigned char c)
9 ASSERT (c == 0x15);
11 void
12 fCheckMinus (unsigned char c)
14 ASSERT (c == 0x13);
16 void
17 getByteParam (unsigned int i)
19 unsigned char c;
21 c = i >> 8;
22 c++;
23 fCheckPlus(c);
24 c = i >> 8;
25 c--;
26 fCheckMinus(c);
29 void
30 testGetByte (void)
32 getByteParam(0x147A);