Branch Coverage

inc/Test/Builder.pm
Criterion Covered Total %
branch 71 252 28.1


line true false branch
19 0 1 if ($] >= 5.008001 and $Test::Builder::Config{'useithreads'} and $INC{'threads.pm'}) { }
29 0 0 if ($type eq 'HASH') { }
0 0 elsif ($type eq 'ARRAY') { }
0 0 elsif ($type eq 'SCALAR') { }
44 0 0 if ($type eq 'HASH') { }
0 0 elsif ($type eq 'ARRAY') { }
0 0 elsif ($type eq 'SCALAR') { }
198 1 0 unless $^C
225 2 5 if (defined $pack)
247 1 1 unless $cmd
251 0 1 if ($$self{'Have_Plan'})
255 0 1 if ($cmd eq 'no_plan') { }
0 1 elsif ($cmd eq 'skip_all') { }
1 0 elsif ($cmd eq 'tests') { }
262 1 0 if ($arg) { }
0 0 elsif (not defined $arg) { }
0 0 elsif (not $arg) { }
295 1 0 if (@_)
296 0 1 unless $max =~ /^\+?\d+$/ and $max > 0
302 1 0 unless $self->no_header
334 0 0 if $$self{'Expected_Tests'}
335 0 0 if $$self{'No_Plan'}
353 0 0 if $reason
358 0 0 unless $self->no_header
387 0 1 $test ? :
397 0 1 if defined $name and $name =~ /^[\d\s]+$/
410 1 0 if (not $test) { }
412 0 1 $todo ? :
419 1 0 if $self->use_numbers
421 1 0 if (defined $name) { }
430 0 1 if ($todo) { }
445 1 0 unless ($test)
446 0 1 $todo ? :
447 1 0 if $ENV{'HARNESS_ACTIVE'}
449 1 0 if (defined $name) { }
458 0 1 $test ? :
468 0 2 unless eval { do { require overload } }
472 0 2 if (_is_object($$thing))
473 0 0 if (my $string_meth = overload::Method($$thing, $type))
485 0 2 if ref $thing
0 2 eval { do { $thing->isa('UNIVERSAL') if ref $thing } } ? :
501 0 0 unless $self->_is_dualvar($$val)
513 0 0 if $numval != 0 and $numval ne $val
540 0 0 unless (defined $got and defined $expect)
545 0 0 unless $test
558 0 0 unless (defined $got and defined $expect)
563 0 0 unless $test
574 0 0 if (defined $$val) { }
575 0 0 if ($type eq 'eq') { }
616 0 0 unless (defined $got and defined $dont_expect)
621 0 0 unless $test
632 0 0 unless (defined $got and defined $dont_expect)
637 0 0 unless $test
710 0 0 unless defined $regex
715 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) { }
723 0 0 length $opts ? :
734 0 0 unless (defined $usable_regex)
751 0 0 if $cmp eq '!~'
757 0 0 unless ($ok)
758 0 0 defined $this ? :
759 0 0 $cmp eq '=~' ? :
789 0 0 $numeric_cmps{$type} ? :
811 0 0 unless ($ok)
812 0 0 if ($type =~ /^(eq|==)$/) { }
825 0 0 defined $got ? :
826 0 0 defined $expect ? :
841 0 0 if defined $file and defined $line
903 0 0 if $self->use_numbers
905 0 0 if length $why
944 0 0 if $self->use_numbers
997 0 1 if (defined $level)
1030 0 1 if (defined $use_nums)
1067 0 6 if (defined $no)
1118 0 4 if $self->no_diag
1119 0 4 unless @msgs
1122 0 4 if $^C
1126 4 0 defined $_ ? :
1132 0 4 unless $msg =~ /\n\Z/
1157 0 2 if $^C
1169 0 2 unless $msg =~ /\n\Z/
1190 0 5 $self->todo ? :
1226 1 2 if (defined $fh)
1235 1 5 if (defined $fh)
1244 1 0 if (defined $fh)
1256 3 0 if ($self->_is_fh($file_or_fh)) { }
1261 0 0 unless open $fh, ">$file_or_fh"
1273 0 3 unless defined $maybe_fh
1275 0 3 if ref \$maybe_fh eq 'GLOB'
1313 0 1 if $Opened_Testhandles
1316 0 1 unless open TESTOUT, '>&STDOUT'
1317 0 1 unless open TESTERR, '>&STDERR'
1359 0 1 unless ($$self{'Have_Plan'})
1390 0 0 if (defined $num)
1391 0 0 unless ($$self{'Have_Plan'})
1399 0 0 if ($num > @$test_results) { }
0 0 elsif ($num < @$test_results) { }
1400 0 0 @$test_results ? :
1515 0 6 unless $pack
1518 0 6 defined ${$pack . '::TODO';} ? :
1537 1 0 wantarray ? :
1581 0 3 if ($check)
1636 0 1 if ($$self{'Original_Pid'} != $$ or not $$self{'Have_Plan'} || $$self{'Test_Died'} or $$self{'Bailed_Out'})
1647 1 0 if (@$test_results) { }
0 0 elsif ($$self{'Skip_All'}) { }
0 0 elsif ($$self{'Test_Died'}) { }
1649 0 1 if ($$self{'No_Plan'})
1650 0 0 unless $self->no_header
1659 0 1 unless defined $$test_results[$idx]
1668 0 1 if ($num_extra < 0) { }
0 1 elsif ($num_extra > 0) { }
1669 0 0 $$self{'Expected_Tests'} == 1 ? :
1675 0 0 $$self{'Expected_Tests'} == 1 ? :
1681 1 0 if ($num_failed)
1683 1 0 $num_failed == 1 ? :
1685 1 0 $num_extra == 0 ? :
1692 0 1 if ($$self{'Test_Died'})
1697 0 0 if _my_exit(255)
1701 1 0 if ($num_failed) { }
0 0 elsif ($num_extra != 0) { }
1702 1 0 $num_failed <= 254 ? :
1711 1 0 if _my_exit($exit_code)
1714 0 0 if _my_exit(0)
1720 0 0 if _my_exit(255)
1724 0 0 if _my_exit(255)
1729 1 0 if defined $Test and not $Test->no_ending