summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rw-r--r--main.c10
-rw-r--r--stdalign.c22
-rw-r--r--stdatomic.c18
-rw-r--r--stdnoreturn.c23
-rw-r--r--threads.c18
-rw-r--r--uchar.c23
7 files changed, 114 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 9d75446..8b06b28 100644
--- a/Makefile
+++ b/Makefile
@@ -20,15 +20,20 @@ TESTOBJS=main.o \
math.o \
setjmp.o \
signal.o \
+ stdalign.o \
stdarg.o \
+ stdatomic.o \
stdbool.o \
stddef.o \
stdint.o \
stdio.o \
stdlib.o \
+ stdnoreturn.o \
string.o \
tgmath.o \
+ threads.o \
time.o \
+ uchar.o \
wchar.o \
wctype.o \
test.o
diff --git a/main.c b/main.c
index a7444d9..8c6de36 100644
--- a/main.c
+++ b/main.c
@@ -52,20 +52,20 @@ int main(int argc, char *argv[])
test_math_h();
/* test_setjmp_h(); */
test_signal_h();
- /* test_stdalign_h(); */
+ test_stdalign_h();
test_stdarg_h();
- /* test_stdatomic_h(); */
+ test_stdatomic_h();
test_stdbool_h();
test_stddef_h();
test_stdint_h();
test_stdio_h();
test_stdlib_h();
- /* test_stdnoreturn_h(); */
+ test_stdnoreturn_h();
test_string_h();
test_tgmath_h();
- /* test_threads_h(); */
+ test_threads_h();
test_time_h();
- /* test_uchar_h(); */
+ test_uchar_h();
test_wchar_h();
test_wctype_h();
diff --git a/stdalign.c b/stdalign.c
new file mode 100644
index 0000000..9fd58bc
--- /dev/null
+++ b/stdalign.c
@@ -0,0 +1,22 @@
+#if defined __STDC_VERSION__ && 201112L <= __STDC_VERSION__
+#include <stdalign.h>
+#include "test.h"
+
+void test_stdalign_h(void)
+{
+ testing_header("stdalign.h");
+
+ /* alignas() */
+ /* alignof() */
+
+ test_defined(__alignas_is_defined);
+ test_defined(__alignof_is_defined);
+
+ testing_end();
+}
+
+#else
+void test_stdalign_h(void)
+{
+}
+#endif
diff --git a/stdatomic.c b/stdatomic.c
new file mode 100644
index 0000000..932b8b5
--- /dev/null
+++ b/stdatomic.c
@@ -0,0 +1,18 @@
+#if defined __STDC_VERSION__ && 201112L <= __STDC_VERSION__ && ! defined __STDC_NO_ATOMICS__
+#include <stdatomic.h>
+#include "test.h"
+
+void test_stdatomic_h(void)
+{
+ testing_header("stdatomic.h");
+
+ /* TODO */
+
+ testing_end();
+}
+
+#else
+void test_stdatomic_h(void)
+{
+}
+#endif
diff --git a/stdnoreturn.c b/stdnoreturn.c
new file mode 100644
index 0000000..1b73017
--- /dev/null
+++ b/stdnoreturn.c
@@ -0,0 +1,23 @@
+#if defined __STDC_VERSION__ && 201112L <= __STDC_VERSION__
+#include <stdnoreturn.h>
+#include "test.h"
+
+noreturn void foo(void)
+{
+ for (;;);
+}
+
+void test_stdnoreturn_h(void)
+{
+ testing_header(".h");
+
+ /* tested by the fact that this compiles */
+
+ testing_end();
+}
+
+#else
+void test_stdnoreturn_h(void)
+{
+}
+#endif
diff --git a/threads.c b/threads.c
new file mode 100644
index 0000000..abc2629
--- /dev/null
+++ b/threads.c
@@ -0,0 +1,18 @@
+#if defined __STDC_VERSION__ && 201112L <= __STDC_VERSION__ && ! defined __STDC_NO_THREADS__
+#include <threads.h>
+#include "test.h"
+
+void test_threads_h(void)
+{
+ testing_header("threads.h");
+
+ /* TODO */
+
+ testing_end();
+}
+
+#else
+void test_threads_h(void)
+{
+}
+#endif
diff --git a/uchar.c b/uchar.c
new file mode 100644
index 0000000..80e9234
--- /dev/null
+++ b/uchar.c
@@ -0,0 +1,23 @@
+#if defined __STDC_VERSION__ && 201112L <= __STDC_VERSION__
+#include <uchar.h>
+#include "test.h"
+
+void test_uchar_h(void)
+{
+ mbstate_t mbstate;
+ size_t size;
+ char16_t char16;
+ char32_t char32;
+
+ testing_header("uchar.h");
+
+ /* TODO */
+
+ testing_end();
+}
+
+#else
+void test_uchar_h(void)
+{
+}
+#endif