Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fudge and correct tests

  • Loading branch information...
commit ae9d8ff453129988a30e3c1d18e6b6fc7baf501d 1 parent 97c4f95
Moritz Lenz moritz authored
Showing with 4 additions and 3 deletions.
  1. +3 −2 S06-signature/code.t
  2. +1 −1  S14-roles/parameter-subtyping.t
5 S06-signature/code.t
View
@@ -23,11 +23,11 @@ ok $collector == 12, 'same with anonymous sub';
sub tester2(&my_sub) { 1 } #OK not used
#?niecza todo
-dies_ok {tester2(42)}, "can't pass thing that doesn't do Callable";
+dies_ok {eval 'tester2(42)' }, "can't pass thing that doesn't do Callable";
sub not_returns_a_sub { 3 };
#?niecza todo
-dies_ok {tester2(not_returns_a_sub)},
+dies_ok { eval 'tester2(not_returns_a_sub)' },
"can't pass thing that doesn't do Callable";
is tester2({ 'block' }), 1, 'Can pass a block to a &parameter';
@@ -47,6 +47,7 @@ is tester2({ 'block' }), 1, 'Can pass a block to a &parameter';
$tracker = &foo
};
#?niecza todo
+ #?rakudo todo 'RT 67932'
lives_ok { foo },
'can call a sub with a code object defaulting to something of its own name';
ok !$tracker.defined, 'the inner &foo is undefined (scoping)';
2  S14-roles/parameter-subtyping.t
View
@@ -50,7 +50,7 @@ is(m(@x), 2, 'multi dispatch relying on parametric subtype');
sub modify(C1 @arr) {
@arr[0] = C1.new;
}
-dies_ok({ modify(@x) }, 'type constraints enforced properly');
+dies_ok({ eval 'modify(@x)' }, 'type constraints enforced properly');
# Use of parametric subtyping for assignment.
my Num @a;
Please sign in to comment.
Something went wrong with that request. Please try again.