Skip to content

Commit

Permalink
move tests for Inf and NaN Str.Numeric
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Jul 14, 2011
1 parent 2a981f3 commit 9dc48a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 0 additions & 3 deletions S03-operators/context-forcers.t
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ sub iis(Mu $a, Mu $b, $descr) {
is +(3i), 3i, "+ context forcer works (4)";
# jnthn and pmichaud believe the next test is incorrect
# is +Mu, 0, "+ context forcer works (8)";
is +"Inf", Inf, "+ context forcer works (9)";
is +"-Inf", -Inf, "+ context forcer works (10)";
is +"NaN", NaN, "+ context forcer works (11)";
is +(?0), 0, "+ context forcer works (13)";
is +(?3), 1, "+ context forcer works (14)";
}
Expand Down
5 changes: 5 additions & 0 deletions S32-str/numeric.t
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ sub f($str) {

check '', Int, 0;
check '123', Int, 123;
check ' 123', Int, 123;
check '1_2_3', Int, 123;
check '+123', Int, 123;
check '-123', Int, -123;
Expand Down Expand Up @@ -109,6 +110,10 @@ f '120e2_';

# TODO: Nums with radix

is +"Inf", 'Inf', 'Inf';
is +"+Inf", 'Inf', '+Inf';
is +"-Inf", '-Inf', '-Inf';
is +"NaN", 'NaN', 'NaN';

check '1+2i', Complex, 1+2i;
check '-1-2i', Complex, -1-2i;
Expand Down

0 comments on commit 9dc48a0

Please sign in to comment.