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