Branch Coverage

inc/Test/Builder.pm
Criterion Covered Total %
branch 81 266 30.4


line true false branch
14 0 4 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 4 0 unless $^C
211 0 1 unless $cmd
215 0 1 if ($$self{'Have_Plan'})
219 0 1 if ($cmd eq 'no_plan') { }
0 1 elsif ($cmd eq 'skip_all') { }
1 0 elsif ($cmd eq 'tests') { }
226 1 0 if ($arg) { }
0 0 elsif (not defined $arg) { }
0 0 elsif (not $arg) { }
259 4 0 if (@_)
260 0 4 unless $max =~ /^\+?\d+$/ and $max > 0
266 4 0 unless $self->no_header
298 0 0 if $$self{'Expected_Tests'}
299 0 0 if $$self{'No_Plan'}
317 0 0 if $reason
322 0 0 unless $self->no_header
343 4 0 if (defined $pack)
375 0 4 $test ? :
385 0 4 if defined $name and $name =~ /^[\d\s]+$/
401 4 0 if (not $test) { }
403 0 4 $todo ? :
410 4 0 if $self->use_numbers
412 4 0 if (defined $name) { }
421 0 4 if ($todo) { }
436 4 0 unless ($test)
437 0 4 $todo ? :
438 4 0 if $ENV{'HARNESS_ACTIVE'}
441 4 0 if (defined $name) { }
450 0 4 $test ? :
458 0 8 unless $self->_try(sub { require overload; } )
461 0 8 if ($self->_is_object($$thing))
462 0 0 if (my $string_meth = overload::Method($$thing, $type))
473 0 8 if ref $thing
0 8 $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 0 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 0 $numeric_cmps{$type} ? :
709 0 0 unless ($ok)
710 0 0 if ($type =~ /^(eq|==)$/) { }
723 0 0 defined $got ? :
724 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 (_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 0 16 wantarray ? :
1035 0 12 unless defined $maybe_fh
1037 12 0 if ref $maybe_fh eq 'GLOB'
1038 0 0 if ref \$maybe_fh eq 'GLOB'
1080 0 22 if (defined $level)
1113 0 4 if (defined $use_nums)
1150 0 30 if (defined $no)
1201 0 22 if $self->no_diag
1202 0 22 unless @msgs
1205 0 22 if $^C
1209 22 0 defined $_ ? :
1215 0 22 unless $msg =~ /\n\Z/
1240 0 8 if $^C
1252 0 8 unless $msg =~ /\n\Z/
1273 0 26 $self->todo ? :
1309 4 8 if (defined $fh)
1318 4 26 if (defined $fh)
1327 4 0 if (defined $fh)
1339 12 0 if ($self->is_fh($file_or_fh)) { }
1343 0 0 unless open $fh, '>', $file_or_fh
1383 0 4 if $Opened_Testhandles
1387 0 4 unless open $Testout, '>&STDOUT'
1388 0 4 unless open $Testerr, '>&STDERR'
1404 0 0 if @src_layers
1445 0 4 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 12 18 if defined $$self{'TODO'}
1604 0 18 unless $pack
1607 0 18 defined ${$pack . '::TODO';} ? :
1628 4 18 wantarray ? :
1672 0 12 if ($check)
1713 0 4 if ($$self{'Original_Pid'} != $$)
1719 0 4 unless ($$self{'Have_Plan'})
1724 0 4 if ($$self{'Bailed_Out'})
1730 4 0 if (@$test_results) { }
0 0 elsif ($$self{'Skip_All'}) { }
0 0 elsif ($real_exit_code) { }
1732 0 4 if ($$self{'No_Plan'})
1733 0 0 unless $self->no_header
1742 11 4 unless defined $$test_results[$idx]
1751 3 1 if ($num_extra < 0) { }
0 1 elsif ($num_extra > 0) { }
1752 0 3 $$self{'Expected_Tests'} == 1 ? :
1758 0 0 $$self{'Expected_Tests'} == 1 ? :
1764 4 0 if ($num_failed)
1766 4 0 $num_failed == 1 ? :
1768 1 3 $num_extra == 0 ? :
1775 3 1 if ($real_exit_code)
1780 3 0 if _my_exit(255)
1784 1 0 if ($num_failed) { }
0 0 elsif ($num_extra != 0) { }
1785 1 0 $num_failed <= 254 ? :
1794 1 0 if _my_exit($exit_code)
1797 0 0 if _my_exit(0)
1803 0 0 if _my_exit(255)
1807 0 0 if _my_exit(255)
1812 4 0 if defined $Test and not $Test->no_ending