Skip to content

Commit

Permalink
[coverage] Cover Capture.antipairs
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed Sep 26, 2016
1 parent 34b31b2 commit 64e0b53
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion S02-types/capture.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 32;
plan 33;

{
my $capture = \(1,2,3);
Expand Down Expand Up @@ -178,4 +178,12 @@ lives-ok { (1..*).Capture.perl }, '.perl of Capture formed from Range does not e
throws-like '(1..*).list.Capture', X::Cannot::Lazy, :action('create a Capture from');
throws-like '(my @ = 1..*).Capture', X::Cannot::Lazy, :action('create a Capture from');

{ # coverage; 2016-09-26
is-deeply \(42, [1, 2], %(:42a), :72a, :x[3, 4], :y{:42a}).antipairs,
(
42 => 0, ([1, 2]) => 1, ({:a(42)}) => 2,
([3, 4]) => "x", 72 => "a", ({:a(42)}) => "y",
), '.antipairs returns correct result';
}

# vim: ft=perl6

0 comments on commit 64e0b53

Please sign in to comment.