Branch Coverage

inc/Test/Builder.pm
Criterion Covered Total %
branch 84 256 32.8


line true false branch
18 0 7 if ($] >= 5.008 and $Test::Builder::Config{'useithreads'} and $INC{'threads.pm'}) { }
28 0 0 if ($type eq 'HASH') { }
0 0 elsif ($type eq 'ARRAY') { }
0 0 elsif ($type eq 'SCALAR') { }
43 0 0 if ($type eq 'HASH') { }
0 0 elsif ($type eq 'ARRAY') { }
0 0 elsif ($type eq 'SCALAR') { }
197 7 0 unless $^C
224 14 13 if (defined $pack)
246 11 7 unless $cmd
248 0 7 if ($$self{'Have_Plan'})
253 0 7 if ($cmd eq 'no_plan') { }
4 3 elsif ($cmd eq 'skip_all') { }
3 0 elsif ($cmd eq 'tests') { }
260 3 0 if ($arg) { }
0 0 elsif (not defined $arg) { }
0 0 elsif (not $arg) { }
294 3 0 if (@_)
295 0 3 unless $max =~ /^\+?\d+$/ and $max > 0
301 3 0 unless $self->no_header
333 0 0 if $$self{'Expected_Tests'}
334 0 0 if $$self{'No_Plan'}
352 4 0 if $reason
357 4 0 unless $self->no_header
386 1 2 $test ? :
388 0 3 unless ($$self{'Have_Plan'})
399 0 3 if defined $name and $name =~ /^[\d\s]+$/
412 2 1 if (not $test) { }
414 0 2 $todo ? :
421 3 0 if $self->use_numbers
423 3 0 if (defined $name) { }
432 0 3 if ($todo) { }
447 2 1 unless ($test)
448 0 2 $todo ? :
449 2 0 if $ENV{'HARNESS_ACTIVE'}
451 2 0 if (defined $name) { }
460 1 2 $test ? :
470 0 6 unless eval { do { require overload } }
474 0 6 if (_is_object($$thing))
475 0 0 if (my $string_meth = overload::Method($$thing, $type))
487 0 6 if ref $thing
0 6 eval { do { $thing->isa('UNIVERSAL') if ref $thing } } ? :
503 0 0 unless $self->_is_dualvar($$val)
515 0 0 if $numval != 0 and $numval ne $val
542 0 0 unless (defined $got and defined $expect)
547 0 0 unless $test
560 0 0 unless (defined $got and defined $expect)
565 0 0 unless $test
576 0 0 if (defined $$val) { }
577 0 0 if ($type eq 'eq') { }
618 0 0 unless (defined $got and defined $dont_expect)
623 0 0 unless $test
634 0 0 unless (defined $got and defined $dont_expect)
639 0 0 unless $test
712 0 0 unless defined $regex
717 0 0 if (ref $regex eq 'Regexp') { }
0 0 elsif (($re, $opts) = $regex =~ m[^ /(.*)/ (\w*) $ ]sx or (undef, $re, $opts) = $regex =~ /^ m([^\w\s]) (.+) \1 (\w*) $/sx) { }
725 0 0 length $opts ? :
736 0 0 unless (defined $usable_regex)
753 0 0 if $cmp eq '!~'
759 0 0 unless ($ok)
760 0 0 defined $this ? :
761 0 0 $cmp eq '=~' ? :
791 0 0 $numeric_cmps{$type} ? :
813 0 0 unless ($ok)
814 0 0 if ($type =~ /^(eq|==)$/) { }
827 0 0 defined $got ? :
828 0 0 defined $expect ? :
843 0 0 if defined $file and defined $line
891 0 0 unless ($$self{'Have_Plan'})
908 0 0 if $self->use_numbers
910 0 0 if length $why
935 0 0 unless ($$self{'Have_Plan'})
952 0 0 if $self->use_numbers
1005 0 3 if (defined $level)
1040 0 3 if (defined $use_nums)
1077 0 25 if (defined $no)
1128 0 11 if $self->no_diag
1129 0 11 unless @msgs
1132 0 11 if $^C
1136 11 0 defined $_ ? :
1142 2 9 unless $msg =~ /\n\Z/
1167 0 10 if $^C
1179 0 10 unless $msg =~ /\n\Z/
1197 0 13 $self->todo ? :
1233 7 10 if (defined $fh)
1242 7 13 if (defined $fh)
1251 7 0 if (defined $fh)
1262 21 0 if (_is_fh($file_or_fh)) { }
1267 0 0 unless open $fh, ">$file_or_fh"
1278 0 21 unless defined $maybe_fh
1280 0 21 if ref \$maybe_fh eq 'GLOB'
1318 0 7 if $Opened_Testhandles
1321 0 7 unless open TESTOUT, '>&STDOUT'
1322 0 7 unless open TESTERR, '>&STDERR'
1352 0 0 if (defined $num)
1353 0 0 unless ($$self{'Have_Plan'})
1362 0 0 if ($num > @$test_results) { }
0 0 elsif ($num < @$test_results) { }
1363 0 0 @$test_results ? :
1478 0 16 unless $pack
1481 0 16 defined ${$pack . '::TODO';} ? :
1500 3 0 wantarray ? :
1544 0 21 if ($check)
1598 4 3 if ($$self{'Original_Pid'} != $$ or not $$self{'Have_Plan'} || $$self{'Test_Died'} or $$self{'Bailed_Out'})
1609 2 1 if (@$test_results) { }
0 1 elsif ($$self{'Skip_All'}) { }
1 0 elsif ($$self{'Test_Died'}) { }
1611 0 2 if ($$self{'No_Plan'})
1612 0 0 unless $self->no_header
1621 0 3 unless defined $$test_results[$idx]
1630 0 2 if ($num_extra < 0) { }
0 2 elsif ($num_extra > 0) { }
1631 0 0 $$self{'Expected_Tests'} == 1 ? :
1637 0 0 $$self{'Expected_Tests'} == 1 ? :
1643 2 0 if ($num_failed)
1645 2 0 $num_failed == 1 ? :
1647 2 0 $num_extra == 0 ? :
1654 0 2 if ($$self{'Test_Died'})
1659 0 0 if _my_exit(255)
1663 2 0 if ($num_failed) { }
0 0 elsif ($num_extra != 0) { }
1664 2 0 $num_failed <= 254 ? :
1673 2 0 if _my_exit($exit_code)
1676 0 0 if _my_exit(0)
1682 1 0 if _my_exit(255)
1686 0 0 if _my_exit(255)
1691 7 0 if defined $Test and not $Test->no_ending