Permalink
Browse files

[t/spec] Add fudge, change to reflect 2.0's new status as Rat, add tw…

…o new tests which do what that test was originally intended to do.

git-svn-id: http://svn.pugscode.org/pugs@29902 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 2563151 commit 00c179095c5a5a004a0c0e8aae152d30b6f9c947 colomon committed Mar 1, 2010
Showing with 13 additions and 2 deletions.
  1. +13 −2 S03-operators/increment.t
View
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 28;
+plan 30;
#L<S03/Autoincrement precedence>
@@ -18,6 +18,7 @@ my $a = Mu;
is($a++, 0, 'Mu++ == 0');
$a = Mu;
+#?rakudo skip 'unimpl Mu--'
ok(notdef($a--), 'Mu-- is undefined');
$a = 'x';
@@ -83,9 +84,19 @@ is($moo, 0, "var was not touched");
{
my $x = 2.0;
$x += 1;
+ ok $x == 3.0, 'can add Int to Rat with +=';
+
+ my Rat $y = 2.0;
+ $y += 1;
+ ok $y == 3.0, 'can add Int to Rat with += and type constraint';
+}
+
+{
+ my $x = 2.0.Num;
+ $x += 1;
ok $x == 3.0, 'can add Int to Num with +=';
- my Num $y = 2.0;
+ my Num $y = 2.0.Num;
$y += 1;
ok $y == 3.0, 'can add Int to Num with += and type constraint';
}

0 comments on commit 00c1790

Please sign in to comment.