struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / scott-compare2.c
blob27747759222ea92e4e4985d28a369f80f54773d6
1 /*
2 */
3 #include <testfwk.h>
5 unsigned int aint0 = 0;
6 unsigned int aint1 = 0;
7 unsigned char achar0 = 0;
8 unsigned char achar1 = 0;
10 void
11 char_lt_char (void)
13 ASSERT (!(achar0 < achar1));
16 void
17 char_gt_char (void)
19 ASSERT (!(achar1 > achar0));
22 void
23 char_lte_char (void)
25 ASSERT (!(achar0 <= achar1));
28 void
29 char_gte_char (void)
31 ASSERT (!(achar1 >= achar0));
34 void
35 char_lt_lit (void)
37 ASSERT (!(achar1 < 0x10));
40 void
41 char_gt_lit (void)
43 ASSERT (!(achar1 > 0x10));
46 void
47 char_lte_lit (void)
49 ASSERT (!(achar1 <= 0x0f));
52 void
53 char_gte_lit (void)
55 ASSERT (!(achar1 >= 0x11));
59 /* ints */
61 void
62 int_lt_int (void)
64 ASSERT (!(aint0 < aint1));
67 void
68 int_gt_int (void)
70 ASSERT (!(aint1 > aint0));
73 void
74 int_lte_int (void)
76 ASSERT (!(aint0 <= aint1));
79 void
80 int_gte_int (void)
82 ASSERT (!(aint1 >= aint0));
85 void
86 int_lt_lit (void)
88 ASSERT (!(aint1 < 0x10));
91 void
92 int_gt_lit (void)
94 ASSERT (!(aint1 > 0x10));
97 void
98 int_lte_lit (void)
100 ASSERT (!(aint1 <= 0x0f));
103 void
104 int_gte_lit (void)
106 ASSERT (!(aint1 >= 0x11));
115 void
116 testCompare2 (void)
119 char_lt_char ();
120 char_gt_char ();
122 achar0++;
123 char_lt_char ();
124 char_gt_char ();
125 char_gte_char ();
126 char_lte_char ();
128 achar1 = 0x10;
129 char_lt_lit ();
130 char_gt_lit ();
131 char_lte_lit ();
132 char_gte_lit ();
136 int_lt_int ();
137 int_gt_int ();
139 aint0++;
140 int_lt_int ();
141 int_gt_int ();
142 int_gte_int ();
143 int_lte_int ();
145 aint1 = 0x10;
146 int_lt_lit ();
147 int_gt_lit ();