line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
5
|
|
|
5
|
|
31
|
use strict; |
|
5
|
|
|
|
|
16
|
|
|
5
|
|
|
|
|
162
|
|
2
|
5
|
|
|
5
|
|
24
|
use warnings; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
180
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Test::Deep::HashElements 1.203; |
5
|
|
|
|
|
|
|
|
6
|
5
|
|
|
5
|
|
26
|
use Test::Deep::Ref; |
|
5
|
|
|
|
|
24
|
|
|
5
|
|
|
|
|
27
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub init |
9
|
|
|
|
|
|
|
{ |
10
|
13
|
|
|
13
|
0
|
24
|
my $self = shift; |
11
|
|
|
|
|
|
|
|
12
|
13
|
|
|
|
|
18
|
my $val = shift; |
13
|
|
|
|
|
|
|
|
14
|
13
|
|
|
|
|
283
|
$self->{val} = $val; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub descend |
18
|
|
|
|
|
|
|
{ |
19
|
13
|
|
|
13
|
0
|
26
|
my $self = shift; |
20
|
|
|
|
|
|
|
|
21
|
13
|
|
|
|
|
36
|
my $got = shift; |
22
|
|
|
|
|
|
|
|
23
|
13
|
|
|
|
|
24
|
my $exp = $self->{val}; |
24
|
|
|
|
|
|
|
|
25
|
13
|
|
|
|
|
46
|
my $data = $self->data; |
26
|
|
|
|
|
|
|
|
27
|
13
|
|
|
|
|
35
|
my $master = $self->getMaster($got, $exp); |
28
|
|
|
|
|
|
|
|
29
|
13
|
|
|
|
|
40
|
foreach my $key (sort keys %$master) |
30
|
|
|
|
|
|
|
{ |
31
|
15
|
|
|
|
|
35
|
$data->{index} = $key; |
32
|
|
|
|
|
|
|
|
33
|
15
|
50
|
|
|
|
34
|
my $got_elem = exists $got->{$key} ? $got->{$key} : $Test::Deep::DNE; |
34
|
15
|
50
|
|
|
|
31
|
my $exp_elem = exists $exp->{$key} ? $exp->{$key} : $Test::Deep::DNE; |
35
|
|
|
|
|
|
|
|
36
|
15
|
100
|
|
|
|
43
|
next if Test::Deep::descend($got_elem, $exp_elem); |
37
|
|
|
|
|
|
|
|
38
|
4
|
|
|
|
|
28
|
return 0; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
9
|
|
|
|
|
23
|
return 1; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub getMaster |
45
|
|
|
|
|
|
|
{ |
46
|
11
|
|
|
11
|
0
|
20
|
my $self = shift; |
47
|
|
|
|
|
|
|
|
48
|
11
|
|
|
|
|
21
|
my ($got, $exp) = @_; |
49
|
|
|
|
|
|
|
|
50
|
11
|
50
|
|
|
|
42
|
return keys %$got > keys %$exp ? $got : $exp; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub render_stack |
54
|
|
|
|
|
|
|
{ |
55
|
4
|
|
|
4
|
0
|
9
|
my $self = shift; |
56
|
4
|
|
|
|
|
11
|
my ($var, $data) = @_; |
57
|
4
|
50
|
|
|
|
16
|
$var .= "->" unless $Test::Deep::Stack->incArrow; |
58
|
4
|
|
|
|
|
15
|
$var .= '{"'.quotemeta($data->{index}).'"}'; |
59
|
|
|
|
|
|
|
|
60
|
4
|
|
|
|
|
9
|
return $var; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
sub reset_arrow |
64
|
|
|
|
|
|
|
{ |
65
|
4
|
|
|
4
|
0
|
12
|
return 0; |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
package Test::Deep::SuperHashElements 1.203; |
69
|
|
|
|
|
|
|
|
70
|
5
|
|
|
5
|
|
38
|
use base 'Test::Deep::HashElements'; |
|
5
|
|
|
|
|
15
|
|
|
5
|
|
|
|
|
855
|
|
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
sub getMaster |
73
|
|
|
|
|
|
|
{ |
74
|
1
|
|
|
1
|
|
2
|
my $self = shift; |
75
|
|
|
|
|
|
|
|
76
|
1
|
|
|
|
|
7
|
my ($got, $exp) = @_; |
77
|
|
|
|
|
|
|
|
78
|
1
|
|
|
|
|
7
|
return $exp; |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
package Test::Deep::SubHashElements 1.203; |
82
|
|
|
|
|
|
|
|
83
|
5
|
|
|
5
|
|
44
|
use base 'Test::Deep::HashElements'; |
|
5
|
|
|
|
|
16
|
|
|
5
|
|
|
|
|
720
|
|
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
sub getMaster |
86
|
|
|
|
|
|
|
{ |
87
|
1
|
|
|
1
|
|
2
|
my $self = shift; |
88
|
|
|
|
|
|
|
|
89
|
1
|
|
|
|
|
2
|
my ($got, $exp) = @_; |
90
|
|
|
|
|
|
|
|
91
|
1
|
|
|
|
|
13
|
return $got; |
92
|
|
|
|
|
|
|
} |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
1; |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
__END__ |