From ad706cc9648f6a1ca8bae27efa9da595268ddb43 Mon Sep 17 00:00:00 2001 From: colomon Date: Mon, 1 Mar 2010 19:28:49 +0000 Subject: [PATCH] [t/spec] Add fudge, change to reflect 2.0's new status as Rat, add two 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 --- t/spec/S03-operators/increment.t | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/t/spec/S03-operators/increment.t b/t/spec/S03-operators/increment.t index 7aa7867d4..99f942516 100644 --- a/t/spec/S03-operators/increment.t +++ b/t/spec/S03-operators/increment.t @@ -2,7 +2,7 @@ use v6; use Test; -plan 28; +plan 30; #L @@ -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'; } -- 2.11.4.GIT