Branch Coverage

blib/lib/Test/More.pm
Criterion Covered Total %
branch 168 180 93.3


line true false branch
186 2 101 if (defined $item and $item eq 'no_diag') { }
4 98 elsif (defined $item and $item eq 'import') { }
190 1 3 if ($import) { }
207 108 3 if ($class eq 'Test::More' and !$import || grep(($_ eq '$TODO'), @$import))
211 1 107 if ($import) { }
548 2 12 unless ($class)
554 2 11 unless (@methods)
562 5 37 unless $tb->_try(sub {
565 7 5 @methods == 1 ? :
614 2 31 if (not defined $thing) { }
27 4 elsif (ref $thing) { }
622 23 4 if (&Scalar::Util::blessed($thing))
633 6 27 if ($error)
634 0 6 unless $error =~ /^Can't (locate|call) method "isa"/
642 4 29 if ($whatami eq 'reference')
647 4 29 if (defined $thing_name) { }
21 8 elsif ($whatami eq 'object') { }
4 4 elsif ($whatami eq 'reference') { }
1 3 elsif ($whatami eq 'undef') { }
3 0 elsif ($whatami eq 'class') { }
649 3 1 defined $thing ? :
678 23 10 if ($rslt) { }
712 1 10 unless @_
720 8 2 if ($success) { }
725 1 1 unless defined $class
890 1 8 unless _is_module_name($module)
901 2 7 unless ($ok)
921 9 4 $module =~ /^[a-zA-Z]\w*$/ ? :
978 28 6 unless @imports
988 3 31 if (@imports == 1 and $imports[0] =~ /^\d+(?:\.\d+)?$/) { }
1012 2 32 unless ($ok)
1033 21 1 if defined $args[-1]
2 1 if defined $args[-1]
1038 1 42 if defined $sigdie
1104 3 84 unless (@_ == 2 or @_ == 3)
1122 6 78 if (not ref $got || ref $expected) { }
4 74 elsif (not ref $got xor not ref $expected) { }
1131 43 31 if (_deep_check($got, $expected)) { }
1151 10 39 if ($type eq 'HASH') { }
15 24 elsif ($type eq 'ARRAY') { }
4 20 elsif ($type eq 'REF') { }
1152 8 2 unless $did_arrow++
1156 15 0 unless $did_arrow++
1172 24 27 ref $val ? :
10 51 _dne($val) ? :
9 61 !defined($val) ? :
1189 2 542 unless ref $thing
1192 542 852 if UNIVERSAL::isa($thing, $type)
1353 5 5 unless (defined $how_many)
1355 2 3 if $plan and $plan =~ /^\d+$/
1360 1 9 if (defined $how_many and $how_many =~ /\D/)
1436 2 1 unless (defined $how_many)
1438 1 1 unless $tb->has_plan eq 'no_plan'
1535 0 70 if (grep((_type($_) ne 'ARRAY'), $a1, $a2))
1540 0 70 if $a1 eq $a2
1543 4 66 $#$a1 > $#$a2 ? :
1545 2 160 $_ > $#$a1 ? :
1546 4 158 $_ > $#$a2 ? :
1548 100 62 if _equal_nonrefs($e1, $e2)
1552 41 21 if $ok
1554 21 41 unless $ok
1563 73 198 if ref $e1 or ref $e2
1565 183 15 if (defined $e1) { }
1566 171 12 if defined $e2 and $e1 eq $e2
1569 12 3 unless defined $e2
1593 10 187 if (defined $e1 xor defined $e2) { }
0 187 elsif (not defined $e1 || defined $e2) { }
7 180 elsif (_dne($e1) xor _dne($e2)) { }
15 165 elsif ($same_ref and $e1 eq $e2) { }
11 154 elsif ($not_ref) { }
1611 7 147 if ($Refs_Seen{$e1}) { }
1619 6 141 unless _type($e2) eq $type
1621 6 141 if ($type eq 'DIFFERENT') { }
70 71 elsif ($type eq 'ARRAY') { }
55 16 elsif ($type eq 'HASH') { }
8 8 elsif ($type eq 'REF') { }
4 4 elsif ($type eq 'SCALAR') { }
4 0 elsif ($type) { }
1634 6 2 if $ok
1639 1 3 if $ok
1656 0 0 if ($check)
1681 0 55 if (grep((_type($_) ne 'HASH'), $a1, $a2))
1686 0 55 if $a1 eq $a2
1689 1 54 keys %$a1 > keys %$a2 ? :
1691 106 3 exists $a1->{$k} ? :
1692 108 1 exists $a2->{$k} ? :
1694 83 26 if _equal_nonrefs($e1, $e2)
1698 12 14 if $ok
1700 14 12 unless $ok
1734 0 9 unless @$a1 == @$a2