Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[t/spec] All those 0.0s and 2.5s were meant to be Nums -- and now the…

…y are again.

git-svn-id: http://svn.pugscode.org/pugs@30500 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit 3dc8e04a751ca16f6ba31e9aa5b9d975ce7aa861 1 parent 4b43cea
colomon authored
Showing with 8 additions and 8 deletions.
  1. +8 −8 S32-num/complex.t
View
16 S32-num/complex.t
@@ -45,29 +45,29 @@ my @examples = (0i, 1 + 0i, -1 + 0i, 1i, -1i, 2 + 0i, -2 + 0i, 2i, -2i,
for @examples -> $z {
is_approx($z + 0, $z, "$z + 0 = $z");
is_approx(0 + $z, $z, "0 + $z = $z");
- is_approx($z + 0.0, $z, "$z + 0.0 = $z");
- is_approx(0.0 + $z, $z, "0.0 + $z = $z");
+ is_approx($z + 0.0.Num, $z, "$z + 0.0.Num = $z");
+ is_approx(0.0.Num + $z, $z, "0.0.Num + $z = $z");
is_approx($z + 0 / 1, $z, "$z + 0/1 = $z");
is_approx(0 / 1 + $z, $z, "0/1 + $z = $z");
is_approx($z - 0, $z, "$z - 0 = $z");
is_approx(0 - $z, -$z, "0 - $z = -$z");
- is_approx($z - 0.0, $z, "$z - 0.0 = $z");
- is_approx(0.0 - $z, -$z, "0.0 - $z = -$z");
+ is_approx($z - 0.0.Num, $z, "$z - 0.0.Num = $z");
+ is_approx(0.0.Num - $z, -$z, "0.0.Num - $z = -$z");
is_approx($z - 0 / 1, $z, "$z - 0/1 = $z");
is_approx(0 / 1 - $z, -$z, "0/1 - $z = -$z");
is_approx($z + 2, $z.re + 2 + ($z.im)i, "$z + 2");
is_approx(2 + $z, $z.re + 2 + ($z.im)i, "2 + $z");
- is_approx($z + 2.5, $z.re + 2.5 + ($z.im)i, "$z + 2.5 = $z");
- is_approx(2.5 + $z, $z.re + 2.5 + ($z.im)i, "2.5 + $z = $z");
+ is_approx($z + 2.5.Num, $z.re + 2.5.Num + ($z.im)i, "$z + 2.5.Num = $z");
+ is_approx(2.5.Num + $z, $z.re + 2.5.Num + ($z.im)i, "2.5.Num + $z = $z");
is_approx($z + 3 / 2, $z.re + 3/2 + ($z.im)i, "$z + 3/2");
is_approx(3 / 2 + $z, $z.re + 3/2 + ($z.im)i, "3/2 + $z");
is_approx($z - 2, $z.re - 2 + ($z.im)i, "$z - 2");
is_approx(2 - $z, -$z.re + 2 - ($z.im)i, "2 - $z");
- is_approx($z - 2.5, $z.re - 2.5 + ($z.im)i, "$z - 2.5 = $z");
- is_approx(2.5 - $z, -$z.re + 2.5 - ($z.im)i, "2.5 - $z = $z");
+ is_approx($z - 2.5.Num, $z.re - 2.5.Num + ($z.im)i, "$z - 2.5.Num = $z");
+ is_approx(2.5.Num - $z, -$z.re + 2.5.Num - ($z.im)i, "2.5.Num - $z = $z");
is_approx($z - 3 / 2, $z.re - 3/2 + ($z.im)i, "$z - 3/2");
is_approx(3 / 2 - $z, -$z.re + 3/2 - ($z.im)i, "3/2 - $z");
}

0 comments on commit 3dc8e04

Please sign in to comment.
Something went wrong with that request. Please try again.