* .version: bumped version to 2.4.7
[fw/sdcc] / support / regression / tests / bitvars.c
1 /** Bit vars test.
2
3 */
4 #include <testfwk.h>
5
6 #if defined (SDCC_STACK_AUTO) || defined (SDCC_hc08) || defined (SDCC_z80) || defined (PORT_HOST)
7 #define NO_BITS
8 #endif
9
10 #ifndef NO_BITS
11 char foo(bit a, bit b, char c)
12 {
13   return a + b + c;
14 }
15 #endif
16
17 void
18 testBits(void)
19 {
20 #ifndef NO_BITS
21   bit x = 2;
22   ASSERT (foo(x,3,4) == 6);
23 #endif
24 }