diff options
author | thevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2009-03-04 17:34:43 +0000 |
---|---|---|
committer | thevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4> | 2009-03-04 17:34:43 +0000 |
commit | 31871d0d1ea28fbd8ccdfe08747393770c78797a (patch) | |
tree | ba0957fc2fce864f69f9709ad8aebb36cebf58c8 /tests/strtoc.dat | |
parent | dd15486f885a3fc86a412a68f9afca6dc019f098 (diff) | |
download | mpc-31871d0d1ea28fbd8ccdfe08747393770c78797a.tar.gz |
src/strtoc.c: Check if nptr is NULL.
tests/strtoc.dat: Add invalid values for the base parameter.
tests/tstrtoc.c: Add a check for null pointer and empty string.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@437 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'tests/strtoc.dat')
-rw-r--r-- | tests/strtoc.dat | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/strtoc.dat b/tests/strtoc.dat index 2be8e10..ecc3208 100644 --- a/tests/strtoc.dat +++ b/tests/strtoc.dat @@ -47,6 +47,10 @@ # In all bases, "nan" is NaN, "inf" is infinity; # The sign of the result is checked with "+inf", "-inf", "-0", or "+0". +# invalid base +0 0 53 nan 53 nan "(1 1)" "(1 1)" 99 N N +0 0 53 nan 53 nan "(1 1)" "(1 1)" 1 N N + # invalid strings 0 0 53 nan 53 nan "" "" 10 N N 0 0 53 nan 53 nan "non" "non" 10 N N @@ -78,6 +82,7 @@ 0 0 53 nan 53 nan "(0 I)" "(0 I)" 18 N N 0 0 53 nan 53 nan "(0 z)" "(0 z)" 35 N N 0 0 53 nan 53 nan "(0 Z)" "(0 Z)" 35 N N + # special values 0 0 53 nan 53 +0 "nan" "" 10 N N 0 0 53 +nan 53 +0 "+NAN" "" 10 N N @@ -100,6 +105,7 @@ 0 0 53 -inf 53 -0 " (-@inf@ -0)" "" 10 N N 0 0 53 +inf 53 nan "(+inf nan(9u137)) " "" 10 N N 0 0 53 nan 53 +0 "NaN + inf" "+ inf" 10 N N + # pure real argument 0 0 53 +0 53 +0 "0" "" 10 N N 0 0 53 +0 53 +0 "00000" "" 10 N N @@ -129,6 +135,7 @@ 0 0 53 18 53 0 "i" "" 19 N N 0 0 53 35 53 0 "z" "" 36 N N 0 0 53 35 53 0 "Z" "" 36 N N + # pure imaginary argument 0 0 53 +0 53 +1 "(0 1)" "" 10 N N 0 0 53 +0 53 +1 "(0 +1)" "" 20 N N @@ -143,6 +150,7 @@ 0 0 53 0 53 18 "(0 I)" "" 19 N N 0 0 53 0 53 35 "(0 z)" "" 36 N N 0 0 53 0 53 35 "(0 Z)" "" 36 N N + # complex argument 0 0 53 +1 53 +1 "( 1 +1)" "" 10 N N 0 0 53 +1 53 +1 " (1 +1) " "" 10 N N |