Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[t/spec]: Unfudge arity tests on blocks and pointy subs.

git-svn-id: http://svn.pugscode.org/pugs@24633 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit d26e3737f536a24b44663737e94b6e7247e90cca 1 parent d9126db
pmichaud authored
Showing with 10 additions and 17 deletions.
  1. +10 −17 S06-signature/arity.t
View
27 S06-signature/arity.t
@@ -34,39 +34,32 @@ is &o_two.arity, 2, 'arity with optional and required named params';
{
is ({ $^a }.arity), 1,
"block with one placeholder var has .arity == 1";
- #?rakudo skip 'pointy block as expression'
is (-> $a { $a }.arity), 1,
"pointy block with one placeholder var has .arity == 1";
- #?rakudo skip 'method calling syntax'
- is arity({ $^a,$^b }:), 2,
+ is { $^a,$^b }.arity, 2,
"block with two placeholder vars has .arity == 2";
- #?rakudo skip 'pointy block as expression'
- is arity(-> $a, $b { $a,$b }:), 2,
+ is (-> $a, $b { $a,$b }).arity, 2,
"pointy block with two placeholder vars has .arity == 2";
- #?rakudo skip 'method calling syntax'
- is arity({ $^a,$^b,$^c }:), 3,
+ is { $^a,$^b,$^c }.arity, 3,
"block with three placeholder vars has .arity == 3";
- #?rakudo skip 'pointy block as expression'
- is arity(-> $a, $b, $c { $a,$b,$c }:), 3,
+ is (-> $a, $b, $c { $a,$b,$c }).arity, 3,
"pointy block with three placeholder vars has .arity == 3";
}
-#?rakudo skip 'method calling syntax'
{
- is arity({ my $k; $^a }:), 1,
+ is { my $k; $^a }.arity, 1,
"additional my() vars don't influence .arity calculation (1-1)";
- is arity({ my $k; $^a,$^b }:), 2,
+ is { my $k; $^a,$^b }.arity, 2,
"additional my() vars don't influence .arity calculation (1-2)";
- is arity({ my $k; $^a,$^b,$^c }:), 3,
+ is { my $k; $^a,$^b,$^c }.arity, 3,
"additional my() vars don't influence .arity calculation (1-3)";
}
-#?rakudo skip 'method calling syntax'
{
- is arity({ $^a; my $k }:), 1,
+ is { $^a; my $k }.arity, 1,
"additional my() vars don't influence .arity calculation (2-1)";
- is arity({ $^a,$^b; my $k }:), 2,
+ is { $^a,$^b; my $k }.arity, 2,
"additional my() vars don't influence .arity calculation (2-2)";
- is arity({ $^a,$^b,$^c; my $k }:), 3,
+ is { $^a,$^b,$^c; my $k }.arity, 3,
"additional my() vars don't influence .arity calculation (2-3)";
}
Please sign in to comment.
Something went wrong with that request. Please try again.