Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[t/spec] fudged S06-traits/misc.t for rakudo

git-svn-id: http://svn.pugscode.org/pugs@22127 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit 1b911a1751bfdb44875d5c9f0d08c500967f749e 1 parent 4ae127a
moritz authored
Showing with 11 additions and 5 deletions.
  1. +11 −5 S06-traits/misc.t
View
16 S06-traits/misc.t
@@ -29,6 +29,7 @@ eval_dies_ok 'sub mods_param_constant ($x is readonly) { $x++; };
'can\'t modify constant parameter, constant by default';
sub mods_param_rw ($x is rw) { $x++; }
+#?rakudo todo "'is rw' can't modify constants"
dies_ok { mods_param_rw(1) }, 'can\'t modify constant even if we claim it\'s rw';
sub mods_param_rw_does_nothing ($x is rw) { $x; }
lives_ok { mods_param_rw_does_nothing(1) }, 'is rw with non-lvalue should autovivify';
@@ -40,18 +41,23 @@ is($foo, 2, 'pass by reference works');
$foo=1;
sub mods_param_copy ($x is copy) {$x++;}
lives_ok { mods_param_copy($foo) }, 'is copy';
+#?rakudo todo 'is copy'
is($foo, 1, 'pass by value works');
# is ref
-$foo=1;
-sub mods_param_ref ($x is ref) { $x++; }
-dies_ok { mods_param_ref(1); }, 'is ref with non-lvalue';
-lives_ok { mods_param_ref($foo); }, 'is ref with non-lvalue', :todo;
-is($foo, 2, 'is ref works', :todo);
+#?rakudo skip 'is ref'
+{
+ $foo=1;
+ sub mods_param_ref ($x is ref) { $x++; }
+ dies_ok { mods_param_ref(1); }, 'is ref with non-lvalue';
+ lives_ok { mods_param_ref($foo); }, 'is ref with non-lvalue', :todo;
+ is($foo, 2, 'is ref works', :todo);
+}
# is context
# Doesn't even compile, which is lucky, because I don't understand it well
# enough to write an actual test...
+#?rakudo skip 'is context'
ok(eval('sub my_format (*@data is context(Item)) { }; 1'), "is context - compile check");
# To do - check that is context actually works
Please sign in to comment.
Something went wrong with that request. Please try again.