File Coverage

blib/lib/Test/Deep/Ref.pm
Criterion Covered Total %
statement 22 22 100.0
branch 2 2 100.0
condition n/a
subroutine 6 6 100.0
pod 0 2 0.0
total 30 32 93.7


line stmt bran cond sub pod time code
1 26     26   179 use strict;
  26         52  
  26         1175  
2 26     26   143 use warnings;
  26         47  
  26         1981  
3              
4             package Test::Deep::Ref 1.205;
5              
6 26     26   5880 use Test::Deep::Cmp;
  26         102  
  26         236  
7              
8 26     26   163 use Scalar::Util qw( blessed );
  26         64  
  26         6256  
9              
10             sub test_class
11             {
12 155     155 0 315 my $self = shift;
13 155         232 my $got = shift;
14              
15 155         514 my $exp = $self->{val};
16            
17 155 100       358 if ($Test::Deep::Snobby)
18             {
19 151         505 return Test::Deep::descend($got, Test::Deep::blessed(blessed($exp)));
20             }
21             else
22             {
23 4         13 return 1;
24             }
25             }
26              
27             sub test_reftype
28             {
29 245     245 0 430 my $self = shift;
30 245         370 my $got = shift;
31 245         475 my $reftype = shift;
32              
33 245         849 return Test::Deep::descend($got, Test::Deep::reftype($reftype));
34             }
35              
36             1;
37              
38             __END__