Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
test for typed object unpacking in subsignatures
  • Loading branch information
moritz committed Oct 20, 2011
1 parent 15664cb commit 340ff7d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion S06-signature/unpack-object.t
@@ -1,6 +1,6 @@
use v6;
use Test;
plan 2;
plan 4;

{
my $tracker = '';
Expand All @@ -19,3 +19,11 @@ plan 2;
}
is $tracker, '42', 'unpacking attribute of custom class';
}

{
multi f((Int :$value, *%)) { "Int $value" }
multi f((Str :$value, *%)) { "Str $value" }
is f('a' => 3 ), 'Int 3', 'typed Pair unpackaing (Int)';
is f('a' => 'x'), 'Str x', 'typed Pair unpackaing (Str)';

}

0 comments on commit 340ff7d

Please sign in to comment.