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