summaryrefslogtreecommitdiff
path: root/iso646.c
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2019-03-01 19:30:30 -0500
committerJakob Kaivo <jkk@ung.org>2019-03-01 19:30:30 -0500
commit8396c02590a6a0d34d0ba667c5e5cff4860d1ebc (patch)
tree656562ee65309d548c57dc420d49e46e31ebddc1 /iso646.c
parent4db28a13a8bbc2eabe69f2b86eda392f3bd72274 (diff)
basic tests for <limits.h>, <float.h>, and <iso646.h>
Diffstat (limited to 'iso646.c')
-rw-r--r--iso646.c29
1 files changed, 29 insertions, 0 deletions
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 <iso646.h>
+#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