Branch Coverage

inc/Test/Builder.pm
Criterion Covered Total %
branch 91 250 36.4


line true false branch
14 0 11 if ($] >= 5.008001 and $Test::Builder::Config{'useithreads'} and $INC{'threads.pm'}) { }
24 0 0 if ($type eq 'HASH') { }
0 0 elsif ($type eq 'ARRAY') { }
0 0 elsif ($type eq 'SCALAR') { }
39 0 0 if ($type eq 'HASH') { }
0 0 elsif ($type eq 'ARRAY') { }
0 0 elsif ($type eq 'SCALAR') { }
181 11 0 unless $^C
259 7 0 if (@_)
260 0 7 unless $max =~ /^\+?\d+$/ and $max > 0
266 7 0 unless $self->no_header
298 0 0 if $$self{'Expected_Tests'}
299 0 0 if $$self{'No_Plan'}
317 4 0 if $reason
322 4 0 unless $self->no_header
343 18 0 if (defined $pack)
375 16 3 $test ? :
385 0 19 if defined $name and $name =~ /^[\d\s]+$/
401 3 16 if (not $test) { }
403 0 3 $todo ? :
410 19 0 if $self->use_numbers
412 19 0 if (defined $name) { }
421 0 19 if ($todo) { }
436 3 16 unless ($test)
437 0 3 $todo ? :
438 3 0 if $ENV{'HARNESS_ACTIVE'}
441 3 0 if (defined $name) { }
450 16 3 $test ? :
458 0 45 unless $self->_try(sub { require overload; } )
461 0 49 if ($self->_is_object($$thing))
462 0 0 if (my $string_meth = overload::Method($$thing, $type))
473 0 49 if ref $thing
0 49 $self->_try(sub { $thing->isa('UNIVERSAL') if ref $thing; } ) ? :
489 0 0 unless $self->_is_dualvar($$val)
501 0 0 if $numval != 0 and $numval ne $val
528 0 2 unless (defined $got and defined $expect)
533 0 0 unless $test
546 0 0 unless (defined $got and defined $expect)
551 0 0 unless $test
562 0 0 if (defined $$val) { }
563 0 0 if ($type eq 'eq') { }
605 0 0 unless (defined $got and defined $dont_expect)
610 0 0 unless $test
621 0 0 unless (defined $got and defined $dont_expect)
626 0 0 unless $test
687 0 2 $numeric_cmps{$type} ? :
709 0 2 unless ($ok)
710 0 0 if ($type =~ /^(eq|==)$/) { }
723 0 0 defined $got ? :
724 0 0 defined $expect ? :
741 2 0 if defined $file and defined $line
811 3 0 if $self->use_numbers
813 3 0 if length $why
852 0 0 if $self->use_numbers
917 0 0 unless defined $regex
922 0 0 if (_is_qr($regex)) { }
0 0 elsif (($re, $opts) = $regex =~ m[^ /(.*)/ (\w*) $ ]sx or (undef, $re, $opts) = $regex =~ /^ m([^\w\s]) (.+) \1 (\w*) $/sx) { }
930 0 0 length $opts ? :
942 0 0 if defined &re::is_regexp
952 0 0 unless (defined $usable_regex)
970 0 0 if $cmp eq '!~'
976 0 0 unless ($ok)
977 0 0 defined $this ? :
978 0 0 $cmp eq '=~' ? :
1018 2 179 wantarray ? :
1035 0 33 unless defined $maybe_fh
1037 33 0 if ref $maybe_fh eq 'GLOB'
1038 0 0 if ref \$maybe_fh eq 'GLOB'
1080 0 31 if (defined $level)
1113 0 22 if (defined $use_nums)
1150 0 44 if (defined $no)
1201 0 22 if $self->no_diag
1202 9 13 unless @msgs
1205 0 13 if $^C
1209 13 0 defined $_ ? :
1215 0 13 unless $msg =~ /\n\Z/
1240 0 33 if $^C
1252 0 33 unless $msg =~ /\n\Z/
1273 0 16 $self->todo ? :
1309 11 33 if (defined $fh)
1318 11 16 if (defined $fh)
1327 11 0 if (defined $fh)
1339 33 0 if ($self->is_fh($file_or_fh)) { }
1343 0 0 unless open $fh, '>', $file_or_fh
1383 0 11 if $Opened_Testhandles
1387 0 11 unless open $Testout, '>&STDOUT'
1388 0 11 unless open $Testerr, '>&STDERR'
1404 0 0 if @src_layers
1445 0 22 unless ($$self{'Have_Plan'})
1476 0 0 if (defined $num)
1477 0 0 unless ($$self{'Have_Plan'})
1485 0 0 if ($num > @$test_results) { }
0 0 elsif ($num < @$test_results) { }
1486 0 0 @$test_results ? :
1601 9 26 if defined $$self{'TODO'}
1604 0 26 unless $pack
1607 0 26 defined ${$pack . '::TODO';} ? :
1628 5 26 wantarray ? :
1672 0 33 if ($check)
1713 0 11 if ($$self{'Original_Pid'} != $$)
1719 4 7 unless ($$self{'Have_Plan'})
1724 0 7 if ($$self{'Bailed_Out'})
1730 4 3 if (@$test_results) { }
0 3 elsif ($$self{'Skip_All'}) { }
3 0 elsif ($real_exit_code) { }
1732 0 4 if ($$self{'No_Plan'})
1733 0 0 unless $self->no_header
1742 0 22 unless defined $$test_results[$idx]
1751 0 4 if ($num_extra < 0) { }
0 4 elsif ($num_extra > 0) { }
1752 0 0 $$self{'Expected_Tests'} == 1 ? :
1758 0 0 $$self{'Expected_Tests'} == 1 ? :
1764 1 3 if ($num_failed)
1766 0 1 $num_failed == 1 ? :
1768 1 0 $num_extra == 0 ? :
1775 0 4 if ($real_exit_code)
1780 0 0 if _my_exit(255)
1784 1 3 if ($num_failed) { }
0 3 elsif ($num_extra != 0) { }
1785 1 0 $num_failed <= 254 ? :
1794 4 0 if _my_exit($exit_code)
1797 0 0 if _my_exit(0)
1803 3 0 if _my_exit(255)
1807 0 0 if _my_exit(255)
1812 11 0 if defined $Test and not $Test->no_ending