line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
5
|
#line 1 |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
35
|
|
2
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
52
|
|
3
|
|
|
|
|
|
|
use warnings; |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Test::Deep::HashKeys; |
6
|
1
|
|
|
1
|
|
6
|
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
6
|
|
7
|
|
|
|
|
|
|
use Test::Deep::Ref; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub init |
10
|
4
|
|
|
4
|
0
|
5
|
{ |
11
|
|
|
|
|
|
|
my $self = shift; |
12
|
4
|
|
|
|
|
6
|
|
13
|
4
|
|
|
|
|
14
|
my %keys; |
14
|
4
|
|
|
|
|
199
|
@keys{@_} = (); |
15
|
4
|
|
|
|
|
22
|
$self->{val} = \%keys; |
16
|
|
|
|
|
|
|
$self->{keys} = [sort @_]; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub descend |
20
|
4
|
|
|
4
|
0
|
5
|
{ |
21
|
4
|
|
|
|
|
6
|
my $self = shift; |
22
|
|
|
|
|
|
|
my $got = shift; |
23
|
4
|
|
|
|
|
8
|
|
24
|
|
|
|
|
|
|
my $exp = $self->{val}; |
25
|
4
|
50
|
|
|
|
20
|
|
26
|
|
|
|
|
|
|
return 0 unless $self->test_reftype($got, "HASH"); |
27
|
4
|
|
|
|
|
13
|
|
28
|
|
|
|
|
|
|
return Test::Deep::descend($got, $self->hashkeysonly($exp)); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub hashkeysonly |
32
|
4
|
|
|
4
|
0
|
576
|
{ |
33
|
|
|
|
|
|
|
require Test::Deep::HashKeysOnly; |
34
|
4
|
|
|
|
|
9
|
|
35
|
4
|
|
|
|
|
4
|
my $self = shift; |
36
|
|
|
|
|
|
|
my $exp = shift; |
37
|
4
|
|
|
|
|
26
|
|
38
|
|
|
|
|
|
|
return Test::Deep::HashKeysOnly->new(keys %$exp) |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
package Test::Deep::SuperHashKeys; |
42
|
1
|
|
|
1
|
|
7
|
|
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
197
|
|
43
|
|
|
|
|
|
|
use base 'Test::Deep::HashKeys'; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub hashkeysonly |
46
|
0
|
|
|
0
|
|
|
{ |
47
|
|
|
|
|
|
|
require Test::Deep::HashKeysOnly; |
48
|
0
|
|
|
|
|
|
|
49
|
0
|
|
|
|
|
|
my $self = shift; |
50
|
|
|
|
|
|
|
my $exp = shift; |
51
|
0
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
return Test::Deep::SuperHashKeysOnly->new(keys %$exp) |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
package Test::Deep::SubHashKeys; |
56
|
1
|
|
|
1
|
|
6
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
131
|
|
57
|
|
|
|
|
|
|
use base 'Test::Deep::HashKeys'; |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub hashkeysonly |
60
|
0
|
|
|
0
|
|
|
{ |
61
|
|
|
|
|
|
|
require Test::Deep::HashKeysOnly; |
62
|
0
|
|
|
|
|
|
|
63
|
0
|
|
|
|
|
|
my $self = shift; |
64
|
|
|
|
|
|
|
my $exp = shift; |
65
|
0
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
return Test::Deep::SubHashKeysOnly->new(keys %$exp) |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
1; |