| 1 | 7 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 7 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | package Test::Deep::Hash 1.205; | ||||||||||
| 5 | |||||||||||
| 6 | 7 | ▶ | use Test::Deep::Ref; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | sub init | ||||||||||
| 9 | 30 | ▶ | { | ||||||||
|
Subroutine
init: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 10 | 30 | my $self = shift; | |||||||||
| 11 | |||||||||||
| 12 | 30 | my $val = shift; | |||||||||
| 13 | |||||||||||
| 14 | 30 | $self->{val} = $val; | |||||||||
| 15 | } | ||||||||||
| 16 | |||||||||||
| 17 | sub descend | ||||||||||
| 18 | 38 | ▶ | { | ||||||||
|
Subroutine
descend: called CC=3 SCAR=11.0
Pod
undocumented
| |||||||||||
| 19 | 38 | my $self = shift; | |||||||||
| 20 | |||||||||||
| 21 | 38 | my $got = shift; | |||||||||
| 22 | |||||||||||
| 23 | 38 | my $exp = $self->{val}; | |||||||||
| 24 | |||||||||||
| 25 | 38 | my $data = $self->data; | |||||||||
| 26 | |||||||||||
| 27 | 38 | ▶ | return 0 unless Test::Deep::descend($got, $self->hash_keys($exp)); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 28 | |||||||||||
| 29 | 16 | ▶ | return 0 unless $self->test_class($got); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 30 | |||||||||||
| 31 | 13 | return Test::Deep::descend($got, $self->hash_elements($exp)); | |||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | sub hash_elements | ||||||||||
| 35 | 11 | ▶ | { | ||||||||
|
Subroutine
hash_elements: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 36 | 11 | require Test::Deep::HashElements; | |||||||||
| 37 | |||||||||||
| 38 | 11 | my $self = shift; | |||||||||
| 39 | |||||||||||
| 40 | 11 | return Test::Deep::HashElements->new(@_); | |||||||||
| 41 | } | ||||||||||
| 42 | |||||||||||
| 43 | sub hash_keys | ||||||||||
| 44 | 36 | ▶ | { | ||||||||
|
Subroutine
hash_keys: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 45 | 36 | require Test::Deep::HashKeys; | |||||||||
| 46 | |||||||||||
| 47 | 36 | my $self = shift; | |||||||||
| 48 | 36 | my $exp = shift; | |||||||||
| 49 | |||||||||||
| 50 | 36 | return Test::Deep::HashKeys->new(keys %$exp); | |||||||||
| 51 | } | ||||||||||
| 52 | |||||||||||
| 53 | sub reset_arrow | ||||||||||
| 54 | 8 | ▶ | { | ||||||||
|
Subroutine
reset_arrow: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 55 | 8 | return 0; | |||||||||
| 56 | } | ||||||||||
| 57 | |||||||||||
| 58 | package Test::Deep::SuperHash 1.205; | ||||||||||
| 59 | |||||||||||
| 60 | 7 | ▶ | use base 'Test::Deep::Hash'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 61 | |||||||||||
| 62 | sub hash_elements | ||||||||||
| 63 | 1 | ▶ | { | ||||||||
|
Subroutine
hash_elements: called CC=1 SCAR=0.0
| |||||||||||
| 64 | 1 | require Test::Deep::HashElements; | |||||||||
| 65 | |||||||||||
| 66 | 1 | my $self = shift; | |||||||||
| 67 | |||||||||||
| 68 | 1 | return Test::Deep::SuperHashElements->new(@_); | |||||||||
| 69 | } | ||||||||||
| 70 | |||||||||||
| 71 | sub hash_keys | ||||||||||
| 72 | 1 | ▶ | { | ||||||||
|
Subroutine
hash_keys: called CC=1 SCAR=0.0
| |||||||||||
| 73 | 1 | require Test::Deep::HashKeys; | |||||||||
| 74 | |||||||||||
| 75 | 1 | my $self = shift; | |||||||||
| 76 | 1 | my $exp = shift; | |||||||||
| 77 | |||||||||||
| 78 | 1 | return Test::Deep::SuperHashKeys->new(keys %$exp); | |||||||||
| 79 | } | ||||||||||
| 80 | |||||||||||
| 81 | package Test::Deep::SubHash 1.205; | ||||||||||
| 82 | |||||||||||
| 83 | 7 | ▶ | use base 'Test::Deep::Hash'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 84 | |||||||||||
| 85 | sub hash_elements | ||||||||||
| 86 | 1 | ▶ | { | ||||||||
|
Subroutine
hash_elements: called CC=1 SCAR=0.0
| |||||||||||
| 87 | 1 | require Test::Deep::HashElements; | |||||||||
| 88 | |||||||||||
| 89 | 1 | my $self = shift; | |||||||||
| 90 | |||||||||||
| 91 | 1 | return Test::Deep::SubHashElements->new(@_); | |||||||||
| 92 | } | ||||||||||
| 93 | |||||||||||
| 94 | sub hash_keys | ||||||||||
| 95 | 1 | ▶ | { | ||||||||
|
Subroutine
hash_keys: called CC=1 SCAR=0.0
| |||||||||||
| 96 | 1 | require Test::Deep::HashKeys; | |||||||||
| 97 | |||||||||||
| 98 | 1 | my $self = shift; | |||||||||
| 99 | 1 | my $exp = shift; | |||||||||
| 100 | |||||||||||
| 101 | 1 | return Test::Deep::SubHashKeys->new(keys %$exp); | |||||||||
| 102 | } | ||||||||||
| 103 | |||||||||||
| 104 | 7 | 1; | |||||||||
| 105 | |||||||||||
| 106 | __END__ | ||||||||||