line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
12
|
|
|
12
|
|
68
|
#line 1 |
|
12
|
|
|
|
|
26
|
|
|
12
|
|
|
|
|
465
|
|
2
|
12
|
|
|
12
|
|
64
|
use strict; |
|
12
|
|
|
|
|
27
|
|
|
12
|
|
|
|
|
1211
|
|
3
|
|
|
|
|
|
|
use warnings; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Test::Deep::HashElements; |
6
|
12
|
|
|
12
|
|
83
|
|
|
12
|
|
|
|
|
25
|
|
|
12
|
|
|
|
|
79
|
|
7
|
|
|
|
|
|
|
use Test::Deep::Ref; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub init |
10
|
67
|
|
|
67
|
0
|
113
|
{ |
11
|
|
|
|
|
|
|
my $self = shift; |
12
|
67
|
|
|
|
|
130
|
|
13
|
|
|
|
|
|
|
my $val = shift; |
14
|
67
|
|
|
|
|
1357
|
|
15
|
|
|
|
|
|
|
$self->{val} = $val; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub descend |
19
|
67
|
|
|
67
|
0
|
128
|
{ |
20
|
|
|
|
|
|
|
my $self = shift; |
21
|
67
|
|
|
|
|
107
|
|
22
|
|
|
|
|
|
|
my $got = shift; |
23
|
67
|
|
|
|
|
157
|
|
24
|
|
|
|
|
|
|
my $exp = $self->{val}; |
25
|
67
|
|
|
|
|
241
|
|
26
|
|
|
|
|
|
|
my $data = $self->data; |
27
|
67
|
|
|
|
|
218
|
|
28
|
|
|
|
|
|
|
my $master = $self->getMaster($got, $exp); |
29
|
67
|
|
|
|
|
225
|
|
30
|
|
|
|
|
|
|
foreach my $key (keys %$master) |
31
|
173
|
|
|
|
|
351
|
{ |
32
|
|
|
|
|
|
|
$data->{index} = $key; |
33
|
173
|
50
|
|
|
|
451
|
|
34
|
173
|
50
|
|
|
|
395
|
my $got_elem = exists $got->{$key} ? $got->{$key} : $Test::Deep::DNE; |
35
|
|
|
|
|
|
|
my $exp_elem = exists $exp->{$key} ? $exp->{$key} : $Test::Deep::DNE; |
36
|
173
|
50
|
|
|
|
588
|
|
37
|
|
|
|
|
|
|
next if Test::Deep::descend($got_elem, $exp_elem); |
38
|
0
|
|
|
|
|
0
|
|
39
|
|
|
|
|
|
|
return 0; |
40
|
|
|
|
|
|
|
} |
41
|
67
|
|
|
|
|
254
|
|
42
|
|
|
|
|
|
|
return 1; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub getMaster |
46
|
67
|
|
|
67
|
0
|
109
|
{ |
47
|
|
|
|
|
|
|
my $self = shift; |
48
|
67
|
|
|
|
|
120
|
|
49
|
|
|
|
|
|
|
my ($got, $exp) = @_; |
50
|
67
|
50
|
|
|
|
255
|
|
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
|
12
|
|
|
12
|
|
77
|
|
|
12
|
|
|
|
|
27
|
|
|
12
|
|
|
|
|
2623
|
|
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
|
12
|
|
|
12
|
|
81
|
|
|
12
|
|
|
|
|
21
|
|
|
12
|
|
|
|
|
131
|
|
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; |