Branch Coverage

inc/Test/Builder.pm
Criterion Covered Total %
branch 80 256 31.2


line true false branch
18 0 4 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 4 0 unless $^C
224 10 10 if (defined $pack)
246 7 3 unless $cmd
248 0 3 if ($$self{'Have_Plan'})
253 0 3 if ($cmd eq 'no_plan') { }
0 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 0 0 if $reason
357 0 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 15 if (defined $no)
1128 0 8 if $self->no_diag
1129 0 8 unless @msgs
1132 0 8 if $^C
1136 8 0 defined $_ ? :
1142 1 7 unless $msg =~ /\n\Z/
1167 0 6 if $^C
1179 0 6 unless $msg =~ /\n\Z/
1197 0 10 $self->todo ? :
1233 4 6 if (defined $fh)
1242 4 10 if (defined $fh)
1251 4 0 if (defined $fh)
1262 12 0 if (_is_fh($file_or_fh)) { }
1267 0 0 unless open $fh, ">$file_or_fh"
1278 0 12 unless defined $maybe_fh
1280 0 12 if ref \$maybe_fh eq 'GLOB'
1318 0 4 if $Opened_Testhandles
1321 0 4 unless open TESTOUT, '>&STDOUT'
1322 0 4 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 13 unless $pack
1481 0 13 defined ${$pack . '::TODO';} ? :
1500 3 0 wantarray ? :
1544 0 12 if ($check)
1598 1 3 if ($$self{'Original_Pid'} != $$ or not $$self{'Have_Plan'} || $$self{'Test_Died'} or $$self{'Bailed_Out'})
1609 3 0 if (@$test_results) { }
0 0 elsif ($$self{'Skip_All'}) { }
0 0 elsif ($$self{'Test_Died'}) { }
1611 0 3 if ($$self{'No_Plan'})
1612 0 0 unless $self->no_header
1621 0 3 unless defined $$test_results[$idx]
1630 0 3 if ($num_extra < 0) { }
0 3 elsif ($num_extra > 0) { }
1631 0 0 $$self{'Expected_Tests'} == 1 ? :
1637 0 0 $$self{'Expected_Tests'} == 1 ? :
1643 2 1 if ($num_failed)
1645 2 0 $num_failed == 1 ? :
1647 2 0 $num_extra == 0 ? :
1654 0 3 if ($$self{'Test_Died'})
1659 0 0 if _my_exit(255)
1663 2 1 if ($num_failed) { }
0 1 elsif ($num_extra != 0) { }
1664 2 0 $num_failed <= 254 ? :
1673 3 0 if _my_exit($exit_code)
1676 0 0 if _my_exit(0)
1682 0 0 if _my_exit(255)
1686 0 0 if _my_exit(255)
1691 4 0 if defined $Test and not $Test->no_ending