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