]> pd.if.org Git - lice/blob - tests/_Bool.c
autocommit for files dated 2014-11-17 20:15:26
[lice] / tests / _Bool.c
1 // bool
2
3 #include <stdbool.h>
4
5 int main(void) {
6     expecti(__bool_true_false_are_defined, 1);
7
8     _Bool a = 0;
9     _Bool b = 1;
10     _Bool c = 2;
11     _Bool d = 3;
12
13     expecti(a, 0);
14     expecti(b, 1);
15     expecti(c, 1);
16     expecti(d, 1);
17
18     a = 3;
19     b = 2;
20     c = 1;
21     d = 0;
22
23     expecti(a, 1);
24     expecti(b, 1);
25     expecti(c, 1);
26     expecti(d, 0);
27
28     bool a1 = false;
29     a1 = !a1;
30     a1 = (a1) ? true : false;
31     expecti(a1, true);
32 }