line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
7
|
#line 1 |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
53
|
|
2
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
39
|
|
3
|
|
|
|
|
|
|
use warnings; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Test::Deep::HashElements; |
6
|
1
|
|
|
1
|
|
7
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
10
|
|
7
|
|
|
|
|
|
|
use Test::Deep::Ref; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub init |
10
|
3
|
|
|
3
|
0
|
9
|
{ |
11
|
|
|
|
|
|
|
my $self = shift; |
12
|
3
|
|
|
|
|
5
|
|
13
|
|
|
|
|
|
|
my $val = shift; |
14
|
3
|
|
|
|
|
122
|
|
15
|
|
|
|
|
|
|
$self->{val} = $val; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub descend |
19
|
3
|
|
|
3
|
0
|
7
|
{ |
20
|
|
|
|
|
|
|
my $self = shift; |
21
|
3
|
|
|
|
|
7
|
|
22
|
|
|
|
|
|
|
my $got = shift; |
23
|
3
|
|
|
|
|
8
|
|
24
|
|
|
|
|
|
|
my $exp = $self->{val}; |
25
|
3
|
|
|
|
|
18
|
|
26
|
|
|
|
|
|
|
my $data = $self->data; |
27
|
3
|
|
|
|
|
12
|
|
28
|
|
|
|
|
|
|
my $master = $self->getMaster($got, $exp); |
29
|
3
|
|
|
|
|
12
|
|
30
|
|
|
|
|
|
|
foreach my $key (keys %$master) |
31
|
1
|
|
|
|
|
4
|
{ |
32
|
|
|
|
|
|
|
$data->{index} = $key; |
33
|
1
|
50
|
|
|
|
16
|
|
34
|
1
|
50
|
|
|
|
4
|
my $got_elem = exists $got->{$key} ? $got->{$key} : $Test::Deep::DNE; |
35
|
|
|
|
|
|
|
my $exp_elem = exists $exp->{$key} ? $exp->{$key} : $Test::Deep::DNE; |
36
|
1
|
50
|
|
|
|
5
|
|
37
|
|
|
|
|
|
|
next if Test::Deep::descend($got_elem, $exp_elem); |
38
|
0
|
|
|
|
|
0
|
|
39
|
|
|
|
|
|
|
return 0; |
40
|
|
|
|
|
|
|
} |
41
|
3
|
|
|
|
|
11
|
|
42
|
|
|
|
|
|
|
return 1; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub getMaster |
46
|
3
|
|
|
3
|
0
|
6
|
{ |
47
|
|
|
|
|
|
|
my $self = shift; |
48
|
3
|
|
|
|
|
8
|
|
49
|
|
|
|
|
|
|
my ($got, $exp) = @_; |
50
|
3
|
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
|
|
8
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
18
|
|
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
|
|
7
|
|
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
6
|
|
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; |