diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2010-12-10 15:58:33 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2010-12-10 15:58:33 -0500 |
commit | f35c591f5b5806c15971ff228d4e318c35d7e989 (patch) | |
tree | 63fb9322b0a686a81762c5ee0a64471b7e22a792 | |
parent | a0d199a383172532c7a3bdca340ed3d045c325bc (diff) | |
download | deheader-f35c591f5b5806c15971ff228d4e318c35d7e989.tar.gz deheader-f35c591f5b5806c15971ff228d4e318c35d7e989.tar.bz2 deheader-f35c591f5b5806c15971ff228d4e318c35d7e989.tar.xz deheader-f35c591f5b5806c15971ff228d4e318c35d7e989.zip |
Tests for atoi(3), atof(3), atol(3).
-rw-r--r-- | test/atof.c | 2 | ||||
-rw-r--r-- | test/atoi.c | 16 | ||||
-rw-r--r-- | test/atol.c | 16 | ||||
-rw-r--r-- | test/regress.chk | 20 |
4 files changed, 50 insertions, 4 deletions
diff --git a/test/atof.c b/test/atof.c index 54e7c60..7925e2e 100644 --- a/test/atof.c +++ b/test/atof.c @@ -1,4 +1,4 @@ -/* atof require <stdlib.h> */ +/* atof requires <stdlib.h> */ /* * Items: atofl(, l64a( diff --git a/test/atoi.c b/test/atoi.c new file mode 100644 index 0000000..661c344 --- /dev/null +++ b/test/atoi.c @@ -0,0 +1,16 @@ +/* atoi requires <stdlib.h> */ + +/* + * Items: atoil(, l64a( + * Requires: <stdlib.h> + * Standardized-By: SuS + * Not-Detected-by: gcc-4.4.3 + Linux + */ + +#include <stdlib.h> + +main(int arg, char **argv) +{ + (void) atoi("2317"); + +} diff --git a/test/atol.c b/test/atol.c new file mode 100644 index 0000000..71d342f --- /dev/null +++ b/test/atol.c @@ -0,0 +1,16 @@ +/* atol requires <stdlib.h> */ + +/* + * Items: atoll(, l64a( + * Requires: <stdlib.h> + * Standardized-By: SuS + * Not-Detected-by: gcc-4.4.3 + Linux + */ + +#include <stdlib.h> + +main(int arg, char **argv) +{ + (void) atol("2317"); + +} diff --git a/test/regress.chk b/test/regress.chk index f11645e..13b2dc2 100644 --- a/test/regress.chk +++ b/test/regress.chk @@ -3,20 +3,27 @@ deheader: test/duplicate.c includes <stdio.h> deheader: test/duplicate.c includes <stdio.h> deheader: test/duplicate.c has more than one inclusion of <stdio.h> deheader: test/asinh.c includes <math.h> +deheader: test/atol.c has requires <stdlib.h> from l64a\s*\( +deheader: test/atol.c includes <stdlib.h> deheader: test/umask.c includes <sys/stat.h> deheader: test/umask.c includes <sys/types.h> deheader: test/umask.c has requires <sys/stat.h>|<sys/types.h> from umask\s*\( deheader: test/a64l.c has requires <stdlib.h> from a64l\s*\( deheader: test/a64l.c includes <stdlib.h> +deheader: test/atexit.c includes <stdlib.h> deheader: test/abs.c includes <stdlib.h> deheader: test/access.c has requires <unistd.h> from access\s*\( deheader: test/access.c includes <unistd.h> +deheader: test/atoi.c has requires <stdlib.h> from l64a\s*\( +deheader: test/atoi.c includes <stdlib.h> 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/atof.c has requires <stdlib.h> from l64a\s*\( +deheader: test/atof.c includes <stdlib.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*\( @@ -24,29 +31,36 @@ 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> +deheader: test/atan2.c has requires <math.h> from atan2\s*\( +deheader: test/atan2.c includes <math.h> deheader: in test/advance.c, retaining required '#include <regexp.h>\n' +deheader: in test/atof.c, retaining required '#include <stdlib.h>\n' +deheader: in test/atoi.c, retaining required '#include <stdlib.h>\n' +deheader: in test/atan2.c, retaining required '#include <math.h>\n' deheader: test/asin.c without <math.h> succeeded. deheader: remove <math.h> from test/asin.c deheader: test/string.c without <string.h> succeeded. deheader: remove <string.h> from test/string.c deheader: test/abs.c without <stdlib.h> succeeded. deheader: remove <stdlib.h> from test/abs.c +deheader: in test/atol.c, retaining required '#include <stdlib.h>\n' +deheader: in test/access.c, retaining required '#include <unistd.h>\n' +deheader: in test/atan.c, retaining required '#include <math.h>\n' deheader: test/duplicate.c without <stdio.h> succeeded. 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. deheader: remove <stdlib.h> from test/abort.c deheader: test/asinh.c without <math.h> succeeded. deheader: remove <math.h> from test/asinh.c +deheader: test/atexit.c without <stdlib.h> failed (512). 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 16 files, 17 includes, 8 removed +deheader: saw 21 files, 22 includes, 8 removed |