Branch Coverage

inc/Test/Builder.pm
Criterion Covered Total %
branch 58 256 22.6


line true false branch
14 0 2 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') { }
193 2 0 unless $^C
220 4 1 if (defined $pack)
242 1 1 unless $cmd
246 0 1 if ($$self{'Have_Plan'})
250 0 1 if ($cmd eq 'no_plan') { }
0 1 elsif ($cmd eq 'skip_all') { }
1 0 elsif ($cmd eq 'tests') { }
257 1 0 if ($arg) { }
0 0 elsif (not defined $arg) { }
0 0 elsif (not $arg) { }
290 1 0 if (@_)
291 0 1 unless $max =~ /^\+?\d+$/ and $max > 0
297 1 0 unless $self->no_header
329 0 0 if $$self{'Expected_Tests'}
330 0 0 if $$self{'No_Plan'}
348 0 0 if $reason
353 0 0 unless $self->no_header
383 1 0 $test ? :
393 0 1 if defined $name and $name =~ /^[\d\s]+$/
404 0 1 if (not $test) { }
406 0 0 $todo ? :
413 1 0 if $self->use_numbers
415 1 0 if (defined $name) { }
424 0 1 if ($todo) { }
439 0 1 unless ($test)
440 0 0 $todo ? :
441 0 0 if $ENV{'HARNESS_ACTIVE'}
444 0 0 if (defined $name) { }
453 1 0 $test ? :
461 0 2 unless $self->_try(sub { require overload; } )
464 0 2 if ($self->_is_object($$thing))
465 0 0 if (my $string_meth = overload::Method($$thing, $type))
476 0 2 if ref $thing
0 2 $self->_try(sub { $thing->isa('UNIVERSAL') if ref $thing; } ) ? :
492 0 0 unless $self->_is_dualvar($$val)
504 0 0 if $numval != 0 and $numval ne $val
531 0 0 unless (defined $got and defined $expect)
536 0 0 unless $test
549 0 0 unless (defined $got and defined $expect)
554 0 0 unless $test
565 0 0 if (defined $$val) { }
566 0 0 if ($type eq 'eq') { }
607 0 0 unless (defined $got and defined $dont_expect)
612 0 0 unless $test
623 0 0 unless (defined $got and defined $dont_expect)
628 0 0 unless $test
689 0 0 $numeric_cmps{$type} ? :
711 0 0 unless ($ok)
712 0 0 if ($type =~ /^(eq|==)$/) { }
725 0 0 defined $got ? :
726 0 0 defined $expect ? :
741 0 0 if defined $file and defined $line
811 0 0 if $self->use_numbers
813 0 0 if length $why
852 0 0 if $self->use_numbers
917 0 0 unless defined $regex
922 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) { }
930 0 0 length $opts ? :
941 0 0 unless (defined $usable_regex)
959 0 0 if $cmp eq '!~'
965 0 0 unless ($ok)
966 0 0 defined $this ? :
967 0 0 $cmp eq '=~' ? :
1005 0 4 wantarray ? :
1022 0 6 unless defined $maybe_fh
1024 6 0 if ref $maybe_fh eq 'GLOB'
1025 0 0 if ref \$maybe_fh eq 'GLOB'
1067 0 0 if (defined $level)
1100 0 1 if (defined $use_nums)
1137 0 3 if (defined $no)
1188 0 0 if $self->no_diag
1189 0 0 unless @msgs
1192 0 0 if $^C
1196 0 0 defined $_ ? :
1202 0 0 unless $msg =~ /\n\Z/
1227 0 2 if $^C
1239 0 2 unless $msg =~ /\n\Z/
1260 0 0 $self->todo ? :
1296 2 2 if (defined $fh)
1305 2 0 if (defined $fh)
1314 2 0 if (defined $fh)
1326 6 0 if ($self->is_fh($file_or_fh)) { }
1330 0 0 unless open $fh, '>', $file_or_fh
1367 0 2 if $Opened_Testhandles
1370 0 2 unless open TESTOUT, '>&STDOUT'
1371 0 2 unless open TESTERR, '>&STDERR'
1413 0 1 unless ($$self{'Have_Plan'})
1444 0 0 if (defined $num)
1445 0 0 unless ($$self{'Have_Plan'})
1453 0 0 if ($num > @$test_results) { }
0 0 elsif ($num < @$test_results) { }
1454 0 0 @$test_results ? :
1569 0 1 unless $pack
1572 0 1 defined ${$pack . '::TODO';} ? :
1591 0 0 wantarray ? :
1635 0 6 if ($check)
1690 1 1 if ($$self{'Original_Pid'} != $$ or not $$self{'Have_Plan'} || $$self{'Test_Died'} or $$self{'Bailed_Out'})
1701 1 0 if (@$test_results) { }
0 0 elsif ($$self{'Skip_All'}) { }
0 0 elsif ($$self{'Test_Died'}) { }
1703 0 1 if ($$self{'No_Plan'})
1704 0 0 unless $self->no_header
1713 0 1 unless defined $$test_results[$idx]
1722 0 1 if ($num_extra < 0) { }
0 1 elsif ($num_extra > 0) { }
1723 0 0 $$self{'Expected_Tests'} == 1 ? :
1729 0 0 $$self{'Expected_Tests'} == 1 ? :
1735 0 1 if ($num_failed)
1737 0 0 $num_failed == 1 ? :
1739 0 0 $num_extra == 0 ? :
1746 0 1 if ($$self{'Test_Died'})
1751 0 0 if _my_exit(255)
1755 0 1 if ($num_failed) { }
0 1 elsif ($num_extra != 0) { }
1756 0 0 $num_failed <= 254 ? :
1765 1 0 if _my_exit($exit_code)
1768 0 0 if _my_exit(0)
1774 0 0 if _my_exit(255)
1778 0 0 if _my_exit(255)
1783 2 0 if defined $Test and not $Test->no_ending