line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
4
|
|
|
4
|
|
28
|
use strict; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
122
|
|
2
|
4
|
|
|
4
|
|
23
|
use warnings; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
153
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Test::Deep::Any 1.204; |
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
21
|
use Scalar::Util (); |
|
4
|
|
|
|
|
31
|
|
|
4
|
|
|
|
|
74
|
|
7
|
4
|
|
|
4
|
|
777
|
use Test::Deep::Cmp; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
36
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub init |
10
|
|
|
|
|
|
|
{ |
11
|
11
|
|
|
11
|
0
|
21
|
my $self = shift; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
my @list = map { |
14
|
11
|
|
|
|
|
22
|
(Scalar::Util::blessed($_) && $_->isa('Test::Deep::Any')) |
15
|
19
|
100
|
100
|
|
|
137
|
? @{ $_->{val} } |
|
1
|
|
|
|
|
3
|
|
16
|
|
|
|
|
|
|
: $_ |
17
|
|
|
|
|
|
|
} @_; |
18
|
|
|
|
|
|
|
|
19
|
11
|
|
|
|
|
156
|
$self->{val} = \@list; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub descend |
23
|
|
|
|
|
|
|
{ |
24
|
9
|
|
|
9
|
0
|
15
|
my $self = shift; |
25
|
9
|
|
|
|
|
14
|
my $got = shift; |
26
|
|
|
|
|
|
|
|
27
|
9
|
|
|
|
|
13
|
foreach my $cmp (@{$self->{val}}) |
|
9
|
|
|
|
|
18
|
|
28
|
|
|
|
|
|
|
{ |
29
|
14
|
100
|
|
|
|
32
|
return 1 if Test::Deep::eq_deeply_cache($got, $cmp); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
4
|
|
|
|
|
10
|
return 0; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub renderExp |
36
|
|
|
|
|
|
|
{ |
37
|
4
|
|
|
4
|
0
|
7
|
my $self = shift; |
38
|
|
|
|
|
|
|
|
39
|
4
|
|
|
|
|
4
|
my @expect = map {; Test::Deep::wrap($_) } @{ $self->{val} }; |
|
8
|
|
|
|
|
15
|
|
|
4
|
|
|
|
|
10
|
|
40
|
4
|
|
|
|
|
9
|
my $things = join(", ", map {$_->renderExp} @expect); |
|
8
|
|
|
|
|
20
|
|
41
|
|
|
|
|
|
|
|
42
|
4
|
|
|
|
|
15
|
return "Any of ( $things )"; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub diagnostics |
46
|
|
|
|
|
|
|
{ |
47
|
4
|
|
|
4
|
0
|
5
|
my $self = shift; |
48
|
4
|
|
|
|
|
8
|
my ($where, $last) = @_; |
49
|
|
|
|
|
|
|
|
50
|
4
|
|
|
|
|
13
|
my $got = $self->renderGot($last->{got}); |
51
|
4
|
|
|
|
|
16
|
my $exp = $self->renderExp; |
52
|
|
|
|
|
|
|
|
53
|
4
|
|
|
|
|
12
|
my $diag = <
|
54
|
|
|
|
|
|
|
Comparing $where with Any |
55
|
|
|
|
|
|
|
got : $got |
56
|
|
|
|
|
|
|
expected : $exp |
57
|
|
|
|
|
|
|
EOM |
58
|
|
|
|
|
|
|
|
59
|
4
|
|
|
|
|
27
|
$diag =~ s/\n+$/\n/; |
60
|
4
|
|
|
|
|
13
|
return $diag; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
4; |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
__END__ |