5 /* bit types are not ANSI - so provide a way of disabling bit types
6 * if this file is used to test other compilers besides SDCC */
7 #define SUPPORT_BIT_TYPES 0
9 /* Some compilers that support bit types do not support bit arithmetic
10 * (like bitx = bity + bitz;) */
11 #define SUPPORT_BIT_ARITHMETIC 0
30 unsigned int aint0
= 0;
31 unsigned int aint1
= 0;
32 unsigned char achar0
= 0;
33 unsigned char achar1
= 0;
34 unsigned char achar2
= 0;
35 unsigned char achar3
= 0;
36 unsigned char *acharP
= 0;
39 test_add_lit2uchar(void)
49 achar0
= achar0
+1; // Should be an increment
53 for(achar1
= 0; achar1
< 100; achar1
++)
56 ASSERT(achar0
== 216);
60 test_add_uchar2uchar_setup(void)
67 test_add_uchar2uchar(void)
69 achar1
= achar1
+ achar0
;
73 for(achar2
= 0; achar2
<7; achar2
++)
76 ASSERT(achar1
== 128);
82 // achar2, achar3 can be anything.
85 test_add_uchar2uchar2_setup(void)
92 test_add_uchar2uchar2(void)
102 ASSERT(achar1
== 39);
104 achar2
= achar1
+ achar0
;
105 ASSERT(achar2
== 46);
107 achar3
= achar2
+ achar1
+ achar0
;
108 ASSERT(achar3
== 92);
112 #if SUPPORT_BIT_TYPES
126 #if SUPPORT_BIT_ARITHMETIC
130 bit3
= bit4
+bit5
+bit6
+bit7
+bit0
;
135 /* add_bit2uchar(void) - assumes bit0 = 1, achar0 = 7 */
138 disabled_test_add_bit2uchar(void)
144 ASSERT(achar0
== bit0
);
148 disabled_test_add_bit2uint(void)
150 ASSERT(aint0
== bit11
);