struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tests / scott-call1.c
blob7ab9db223f9a0983db2f4f7b1a7c356e95a4cda4
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 unsigned char call3 (void);
12 void
13 call1 (unsigned char uc0)
15 ASSERT (!(uc0));
18 void
19 call2 (unsigned int ui0)
21 ASSERT (!(ui0));
25 unsigned char
26 call3 (void)
28 ASSERT (!(achar0));
30 return 0;
33 unsigned int
34 call4 (void)
36 unsigned int i = 0;
38 if (aint0)
39 i++;
41 return (i);
45 unsigned int
46 call5 (unsigned int k)
49 ASSERT (!(k));
51 return (k);
55 void
56 testCall1 (void)
59 call1 (achar0);
60 call2 (aint0);
61 achar1 = call3 ();
62 aint1 = call4 ();
63 ASSERT (!(aint1));
65 aint1 = call5 (aint0);
66 ASSERT (!(aint1));