From 0d7637fcf8c841de0d2837cbf5de3078c5ff02c1 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 10 Dec 2010 08:34:07 -0500 Subject: Tests for alarm(), asin(), asinh(). --- test/README | 11 +++++++++++ test/alarm.c | 15 +++++++++++++++ test/asin.c | 15 +++++++++++++++ test/asinh.c | 15 +++++++++++++++ test/regress.chk | 19 ++++++++++++++----- 5 files changed, 70 insertions(+), 5 deletions(-) create mode 100644 test/alarm.c create mode 100644 test/asin.c create mode 100644 test/asinh.c diff --git a/test/README b/test/README index 5eb212e..989d61c 100644 --- a/test/README +++ b/test/README @@ -1,2 +1,13 @@ This directory contains C sourcfiles intended to test deheader, and a check against which to compare the output. + +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. + +SuS things excluded by this criterion: + +aio.h - aio_* entry points for asynchronous input and output +time.h - asctime() and asctime_r() diff --git a/test/alarm.c b/test/alarm.c new file mode 100644 index 0000000..4452b58 --- /dev/null +++ b/test/alarm.c @@ -0,0 +1,15 @@ +/* alarm() requires */ + +/* + * Items: alarm( + * Requires: + * Standardized-By: SuS + * Detected-by: gcc-4.4.3 + Linux + */ + +#include + +main(int arg, char **argv) +{ + alarm(23); +} diff --git a/test/asin.c b/test/asin.c new file mode 100644 index 0000000..f102999 --- /dev/null +++ b/test/asin.c @@ -0,0 +1,15 @@ +/* asin() requires */ + +/* + * Items: asin( + * Requires: + * Standardized-By: SuS + * Not-Detected-by: gcc-4.4.3 + Linux + */ + +#include + +main(int arg, char **argv) +{ + asin(-23.0); +} diff --git a/test/asinh.c b/test/asinh.c new file mode 100644 index 0000000..8b9151e --- /dev/null +++ b/test/asinh.c @@ -0,0 +1,15 @@ +/* asinh() requires */ + +/* + * Items: asinh( + * Requires: + * Standardized-By: SuS + * Not-Detected-by: gcc-4.4.3 + Linux + */ + +#include + +main(int arg, char **argv) +{ + asinh(-23.0); +} diff --git a/test/regress.chk b/test/regress.chk index ef6a689..5c12e5d 100644 --- a/test/regress.chk +++ b/test/regress.chk @@ -2,6 +2,7 @@ deheader: test/string.c includes deheader: test/duplicate.c includes deheader: test/duplicate.c includes deheader: test/duplicate.c has more than one inclusion of +deheader: test/asinh.c includes deheader: test/umask.c includes deheader: test/umask.c includes deheader: test/umask.c has requires | from umask\s*\( @@ -10,28 +11,36 @@ deheader: test/a64l.c includes deheader: test/abs.c includes deheader: test/access.c has requires from access\s*\( deheader: test/access.c includes +deheader: test/alarm.c includes deheader: test/acos.c has requires from acos\s*\( deheader: test/acos.c includes deheader: test/abort.c includes deheader: test/acosh.c has requires from acosh\s*\( deheader: test/acosh.c includes +deheader: test/asin.c includes deheader: test/advance.c has requires from advance\s*\( deheader: test/advance.c includes deheader: in test/advance.c, retaining required '#include \n' +deheader: test/asin.c without succeeded. +deheader: remove from test/asin.c deheader: test/string.c without succeeded. deheader: remove from test/string.c deheader: test/abs.c without succeeded. deheader: remove from test/abs.c +deheader: test/duplicate.c without succeeded. +deheader: test/duplicate.c without succeeded. +deheader: remove from test/duplicate.c +deheader: remove from test/duplicate.c deheader: in test/access.c, retaining required '#include \n' deheader: in test/acosh.c, retaining required '#include \n' deheader: in test/a64l.c, retaining required '#include \n' deheader: test/abort.c without succeeded. deheader: remove from test/abort.c -deheader: test/duplicate.c without succeeded. -deheader: test/duplicate.c without succeeded. -deheader: remove from test/duplicate.c -deheader: remove from test/duplicate.c +deheader: test/asinh.c without succeeded. +deheader: remove from test/asinh.c deheader: in test/umask.c, retaining required '#include \n' deheader: in test/umask.c, retaining required '#include \n' deheader: in test/acos.c, retaining required '#include \n' -deheader: saw 11 files, 12 includes, 5 removed +deheader: test/alarm.c without succeeded. +deheader: remove from test/alarm.c +deheader: saw 14 files, 15 includes, 8 removed -- cgit v1.2.3-70-g09d2