struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / while.c
blob31390afe6f1e9afbf5354f6f68c2357ea993db80
1 /*
2 while.c
3 */
5 #include <testfwk.h>
7 char c1 = 0, c2 = 1;
9 void
10 testEmptyWhile(void)
12 /* loops forever if bug is present */
13 do {} while (c1 && c2);
15 /* other cases: */
16 do {} while ( c1 && c1);
17 do {} while ( c1 && !c2);
18 do {} while (!c1 && !c2);
19 do {} while ( c2 && c1);
20 do {} while (!c2 && c1);
21 do {} while (!c2 && !c1);
22 do {} while (!c2 && !c2);
24 do {} while ( c1 || c1);
25 do {} while ( c1 || !c2);
26 do {} while (!c2 || c1);
27 do {} while (!c2 || !c2);
29 ASSERT(1);