diff options
Diffstat (limited to 'test/regression/bool.c')
-rw-r--r-- | test/regression/bool.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/regression/bool.c b/test/regression/bool.c new file mode 100644 index 0000000..d2b3857 --- /dev/null +++ b/test/regression/bool.c @@ -0,0 +1,29 @@ +/* Testing _Bool type support */ + +#include <stdio.h> + +int x = 42; + +int main() +{ + _Bool a, b, c, d, e, f, g, h, i; + a = x; + b = x >= 100; + c = &x; + d = a && b; + e = a || b; + f = a & b; + g = a | b; + h = 3.14; + i = 0.0; + printf("a = %d\n", a); + printf("b = %d\n", b); + printf("c = %d\n", c); + printf("d = %d\n", d); + printf("e = %d\n", e); + printf("f = %d\n", f); + printf("g = %d\n", g); + printf("h = %d\n", h); + printf("i = %d\n", i); + return 0; +} |