summaryrefslogtreecommitdiff
path: root/stdbool.c
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2019-03-01 19:45:11 -0500
committerJakob Kaivo <jkk@ung.org>2019-03-01 19:45:11 -0500
commitdf9ef3a48883d4a34eeabbfd5af42f289c1353c2 (patch)
tree64c86cb73063a3d315de7c3c94b508ce1679e8ef /stdbool.c
parent8396c02590a6a0d34d0ba667c5e5cff4860d1ebc (diff)
basic tests for stdbool.h and stddef.h
Diffstat (limited to 'stdbool.c')
-rw-r--r--stdbool.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/stdbool.c b/stdbool.c
new file mode 100644
index 0000000..bb43b55
--- /dev/null
+++ b/stdbool.c
@@ -0,0 +1,22 @@
+#if defined __STDC_VERSION__ && 199901L <= __STDC_VERSION__
+#include <stdbool.h>
+#include "test.h"
+
+static bool b;
+
+void test_stdbool_h(void)
+{
+ testing_header("stdbool.h");
+
+ test_true(true);
+ test_false(false);
+ test_true(__bool_true_false_are_defined);
+
+ testing_end();
+}
+
+#else
+void test_stdbool_h(void)
+{
+}
+#endif