Permalink
Browse files

Fix(?) S06/lvalue-subroutines, fudge Proxy tests for niecza

  • Loading branch information...
1 parent 5815031 commit 428e7b0384abbcac5913bdac0e3352f378cc4dfe @sorear sorear committed Feb 4, 2012
Showing with 4 additions and 5 deletions.
  1. +0 −1 S02-types/declare.t
  2. +4 −4 S06-routine-modifiers/lvalue-subroutines.t
View
@@ -374,7 +374,6 @@ plan 79;
isa_ok($mapti, Matcher);
}
-#?niecza skip 'Proxy not implemented'
{
my Proxy $krati;
isa_ok($krati, Proxy);
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 15;
+plan 14;
=begin description
@@ -32,6 +32,7 @@ Testing lvalue-returning subroutines
my $notlvalue = sub () { $var };
#?pugs 2 todo 'bug'
+ #?niecza 2 todo 'rw checking'
dies_ok { $notlvalue() = 23 },
"assigning to non-rw subrefs should die";
is $var, 42,
@@ -56,14 +57,13 @@ Testing lvalue-returning subroutines
# S6 says that lvalue subroutines are marked out by 'is rw'
sub notlvalue { $var; } # without rw
+ #?niecza 2 todo 'rw checking'
dies_ok { notlvalue() = 5 },
"assigning to non-rw subs should die";
is $var, 42,
"assigning to non-rw subs shouldn't modify the original variable";
}
-my $val2; # XXX prevent parsefail below, not sure what test wants
-
sub check ($passwd) { $passwd eq "fish"; };
sub checklastval ($passwd) is rw {
@@ -84,7 +84,7 @@ dies_ok {checklastval("octopus") = 10 }, 'checklastval STORE can die';
# Above test may well die for the wrong reason, if the Proxy stuff didn't
# parse OK, it will complain that it couldn't find the desired subroutine
#?rakudo 3 skip 'maximum recursion depth exceeded'
-is((try { checklastval("fish") = 12; $val2 }), 12, 'proxy lvalue subroutine STORE works');
+is((try { checklastval("fish") = 12 }), 12, 'proxy lvalue subroutine STORE works');
my $resultval = checklastval("fish");
is($resultval, 12, 'proxy lvalue subroutine FETCH works');

0 comments on commit 428e7b0

Please sign in to comment.