Branch Coverage

inc/Test/Builder.pm
Criterion Covered Total %
branch 73 266 27.4


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