Skip to content

Commit

Permalink
[t/spec] Add tests for < on Reals.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.pugscode.org/pugs@30326 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
colomon committed Apr 6, 2010
1 parent 9300506 commit 830ef85
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions S32-num/real-bridge.t
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ is 1.Rat <=> $one, 0, "1 == 1";
is 1.001 <=> $one-and-one-hundredth, -1, "1.001 < 1.01";
is $neg-pi <=> -3.14, 0, "-3.14 == -3.14";

nok $zero < 0, "not 0 < 0";
nok $one < 0.Num, "not 1 < 0";
ok $one-and-one-hundredth < 1.1, "1.01 < 1.1";
ok $neg-pi < -3, "-3.14 < -3";
ok -1 < $zero, "-1 < 0";
nok 1.Rat < $one, "not 1 < 1";
ok 1.001 < $one-and-one-hundredth, "1.001 < 1.01";
nok $neg-pi < -3.14, "not -3.14 < -3.14";

done_testing;

# vim: ft=perl6

0 comments on commit 830ef85

Please sign in to comment.