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