summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-12-10 15:07:24 -0500
committerEric S. Raymond <esr@thyrsus.com>2010-12-10 15:07:24 -0500
commit06943df8ee140218f1e43324602139ae1973c58d (patch)
treed29404339ea839aa1bdf4ace6c1a236c2df24f2e /test
parent0d7637fcf8c841de0d2837cbf5de3078c5ff02c1 (diff)
downloaddeheader-06943df8ee140218f1e43324602139ae1973c58d.tar.gz
deheader-06943df8ee140218f1e43324602139ae1973c58d.tar.bz2
deheader-06943df8ee140218f1e43324602139ae1973c58d.tar.xz
deheader-06943df8ee140218f1e43324602139ae1973c58d.zip
Tests for atan(3) and atanh(3).
Diffstat (limited to 'test')
-rw-r--r--test/README10
-rw-r--r--test/atan.c15
-rw-r--r--test/atanh.c15
-rw-r--r--test/regress.chk8
4 files changed, 43 insertions, 5 deletions
diff --git a/test/README b/test/README
index 989d61c..1c0d9cb 100644
--- a/test/README
+++ b/test/README
@@ -5,9 +5,11 @@ Many of these examples are takem from the Single Unix Standard's list
of section 2 and 3 entry points. I don't explicitly test anything in
SuS with a structure- or pointer-to-structure type argument; that will
fail as it should on any modern compiler because the struct is neither
-defined nor the derived pointer type forward-declared with a stup.
+defined nor the derived pointer type forward-declared with a stup. I
+also ignore any header that declares only macros.
-SuS things excluded by this criterion:
+SuS things excluded by these criteria:
-aio.h - aio_* entry points for asynchronous input and output
-time.h - asctime() and asctime_r()
+aio.h - aio_* entry points for asynchronous input and output
+time.h - asctime() and asctime_r()
+assert.h - assert() macro
diff --git a/test/atan.c b/test/atan.c
new file mode 100644
index 0000000..56c2dc8
--- /dev/null
+++ b/test/atan.c
@@ -0,0 +1,15 @@
+/* atan() requires <stdlib.h> */
+
+/*
+ * Items: atan(
+ * Requires: <stdlib.h>
+ * Standardized-By: SuS
+ * Not-Detected-by: gcc-4.4.3 + Linux
+ */
+
+#include <math.h>
+
+main(int arg, char **argv)
+{
+ atan(-23.0);
+}
diff --git a/test/atanh.c b/test/atanh.c
new file mode 100644
index 0000000..8adca10
--- /dev/null
+++ b/test/atanh.c
@@ -0,0 +1,15 @@
+/* atanh() requires <stdlib.h> */
+
+/*
+ * Items: atanh(
+ * Requires: <stdlib.h>
+ * Standardized-By: SuS
+ * Not-Detected-by: gcc-4.4.3 + Linux
+ */
+
+#include <math.h>
+
+main(int arg, char **argv)
+{
+ atanh(-23.0);
+}
diff --git a/test/regress.chk b/test/regress.chk
index 5c12e5d..f11645e 100644
--- a/test/regress.chk
+++ b/test/regress.chk
@@ -15,8 +15,12 @@ deheader: test/alarm.c includes <unistd.h>
deheader: test/acos.c has requires <math.h> from acos\s*\(
deheader: test/acos.c includes <math.h>
deheader: test/abort.c includes <stdlib.h>
+deheader: test/atanh.c has requires <math.h> from atanh\s*\(
+deheader: test/atanh.c includes <math.h>
deheader: test/acosh.c has requires <math.h> from acosh\s*\(
deheader: test/acosh.c includes <math.h>
+deheader: test/atan.c has requires <math.h> from atan\s*\(
+deheader: test/atan.c includes <math.h>
deheader: test/asin.c includes <math.h>
deheader: test/advance.c has requires <regexp.h> from advance\s*\(
deheader: test/advance.c includes <regexp.h>
@@ -32,6 +36,7 @@ deheader: test/duplicate.c without <stdio.h> succeeded.
deheader: remove <stdio.h> from test/duplicate.c
deheader: remove <stdio.h> from test/duplicate.c
deheader: in test/access.c, retaining required '#include <unistd.h>\n'
+deheader: in test/atan.c, retaining required '#include <math.h>\n'
deheader: in test/acosh.c, retaining required '#include <math.h>\n'
deheader: in test/a64l.c, retaining required '#include <stdlib.h>\n'
deheader: test/abort.c without <stdlib.h> succeeded.
@@ -41,6 +46,7 @@ deheader: remove <math.h> from test/asinh.c
deheader: in test/umask.c, retaining required '#include <sys/types.h>\n'
deheader: in test/umask.c, retaining required '#include <sys/stat.h>\n'
deheader: in test/acos.c, retaining required '#include <math.h>\n'
+deheader: in test/atanh.c, retaining required '#include <math.h>\n'
deheader: test/alarm.c without <unistd.h> succeeded.
deheader: remove <unistd.h> from test/alarm.c
-deheader: saw 14 files, 15 includes, 8 removed
+deheader: saw 16 files, 17 includes, 8 removed