summaryrefslogtreecommitdiff
path: root/test/stdlib/teststrtoq.c
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-10-28 20:29:21 +0200
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-10-28 20:31:55 +0200
commit99ef2719fb3d703fe38c4113cd7f5adec516dd3a (patch)
tree2c1f77cb41b60ccbf8faa77a3640491a3546b546 /test/stdlib/teststrtoq.c
parent543308f6c46cf2edf8a524bc9c631e472570fe72 (diff)
test: remove test suite
The test suite is now a developed in a separate git repository. See here: http://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng-test.git The test suite should be just like every other software compiled with the cross-toolchain. In the past strange problems where found when the test suite got build in the toolchain creation step.
Diffstat (limited to 'test/stdlib/teststrtoq.c')
-rw-r--r--test/stdlib/teststrtoq.c89
1 files changed, 0 insertions, 89 deletions
diff --git a/test/stdlib/teststrtoq.c b/test/stdlib/teststrtoq.c
deleted file mode 100644
index 6e1a4cbc6..000000000
--- a/test/stdlib/teststrtoq.c
+++ /dev/null
@@ -1,89 +0,0 @@
-
-#include <stdlib.h>
-#include <stdio.h>
-
-
-const char *strings[]={
- /* some simple stuff */
- "0", "1", "10",
- "100", "1000", "10000", "100000", "1000000",
- "10000000", "100000000", "1000000000",
-
- /* negative */
- "-0", "-1", "-10",
- "-100", "-1000", "-10000", "-100000", "-1000000",
- "-10000000", "-100000000", "-1000000000",
-
- /* test base>10 */
- "a", "b", "f", "g", "z",
-
- /* test hex */
- "0x0", "0x1", "0xa", "0xf", "0x10",
-
- /* test octal */
- "00", "01", "07", "08", "0a", "010",
-
- /* other */
- "0x8000000",
-
- /* check overflow cases: (for 32 bit) */
- "2147483645",
- "2147483646",
- "2147483647",
- "2147483648",
- "2147483649",
- "-2147483645",
- "-2147483646",
- "-2147483647",
- "-2147483648",
- "-2147483649",
- "4294967293",
- "4294967294",
- "4294967295",
- "4294967296",
- "4294967297",
- "-4294967293",
- "-4294967294",
- "-4294967295",
- "-4294967296",
- "-4294967297",
-
- /* bad input tests */
- "",
- "00",
- "0x",
- "0x0",
- "-",
- "+",
- " ",
- " -",
- " - 0",
-};
-int n_tests=sizeof(strings)/sizeof(strings[0]);
-
-
-
-void do_test(int base);
-void do_test(int base)
-{
- int i;
- quad_t n;
- char *endptr;
-
- for(i=0;i<n_tests;i++){
- n=strtoq(strings[i],&endptr,base);
- printf("strtoq(\"%s\",%d) len=%lu res=%qd\n",
- strings[i],base,(unsigned long)(endptr-strings[i]),n);
- }
-}
-
-int main(int argc,char *argv[])
-{
- do_test(0);
- do_test(8);
- do_test(10);
- do_test(16);
- do_test(36);
-
- return 0;
-}