From 8396c02590a6a0d34d0ba667c5e5cff4860d1ebc Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Fri, 1 Mar 2019 19:30:30 -0500 Subject: basic tests for , , and --- iso646.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 iso646.c (limited to 'iso646.c') diff --git a/iso646.c b/iso646.c new file mode 100644 index 0000000..384c2bf --- /dev/null +++ b/iso646.c @@ -0,0 +1,29 @@ +#if defined __STDC_VERSION__ +#include +#include "test.h" + +void test_iso646_h(void) +{ + int i = 1; + testing_header("iso646.h"); + + test_true(i and 1); + test_true(i and_eq 1); + test_true(i bitand 1); + test_true(i bitor 1); + test_true(compl i); + test_false(not i); + test_true(i not_eq 0); + test_true(0 or i); + test_true(i or_eq 1); + test_true(i xor 0); + test_true(i xor_eq 0); + + testing_end(); +} + +#else +void test_iso646_h(void) +{ +} +#endif -- cgit v1.2.1