summaryrefslogtreecommitdiff
path: root/errno.c
diff options
context:
space:
mode:
Diffstat (limited to 'errno.c')
-rw-r--r--errno.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/errno.c b/errno.c
new file mode 100644
index 0000000..63e003c
--- /dev/null
+++ b/errno.c
@@ -0,0 +1,34 @@
+#include <errno.h>
+#include "test.h"
+
+#ifndef EDOM
+#error EDOM not defined
+#endif
+
+#ifndef ERANGE
+#error ERANGE not defined
+#endif
+
+#if __STDC_VERSION__ >= 199409
+#ifndef EILSEQ
+#error EILSEQ not defined
+#endif
+#endif
+
+void test_errno(void)
+{
+ struct lconv *lc;
+ int errno_values[] = {
+ EDOM,
+ ERANGE,
+ #ifdef EILSEQ
+ EILSEQ,
+ #endif
+ };
+
+ testing_header("errno.h");
+
+ test_distinct(errno_values);
+
+ testing_end();
+}