Branch Coverage

support/Test/Builder.pm
Criterion Covered Total %
branch 72 254 28.3


line true false branch
18 0 11 if ($] >= 5.008 and $Config{'useithreads'} and $INC{'threads.pm'}) { }
28 0 0 if ($type eq 'HASH') { }
0 0 elsif ($type eq 'ARRAY') { }
0 0 elsif ($type eq 'SCALAR') { }
43 0 0 if ($type eq 'HASH') { }
0 0 elsif ($type eq 'ARRAY') { }
0 0 elsif ($type eq 'SCALAR') { }
198 11 0 unless $^C
225 22 0 if (defined $pack)
247 12 11 unless $cmd
249 0 11 if ($$self{'Have_Plan'})
254 0 11 if ($cmd eq 'no_plan') { }
0 11 elsif ($cmd eq 'skip_all') { }
11 0 elsif ($cmd eq 'tests') { }
261 11 0 if ($arg) { }
0 0 elsif (not defined $arg) { }
0 0 elsif (not $arg) { }
295 11 0 if (@_)
296 0 11 unless $max =~ /^\+?\d+$/ and $max > 0
302 11 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 2157 0 $test ? :
389 0 2157 unless ($$self{'Have_Plan'})
400 0 2157 if defined $name and $name =~ /^[\d\s]+$/
413 0 2157 if (not $test) { }
415 0 0 $todo ? :
422 2157 0 if $self->use_numbers
424 2118 39 if (defined $name) { }
433 0 2157 if ($todo) { }
448 0 2157 unless ($test)
449 0 0 $todo ? :
450 0 0 if $ENV{'HARNESS_ACTIVE'}
452 0 0 if (defined $name) { }
461 2157 0 $test ? :
471 0 20692 unless eval {
475 80 36990 if (_is_object($$thing))
476 0 80 if (my $string_meth = overload::Method($$thing, $type))
488 2594 34476 if ref $thing
80 36990 eval {
504 0 0 unless $self->_is_dualvar($$val)
516 0 0 if $numval != 0 and $numval ne $val
543 104 1488 if (not defined $got or not defined $expect)
548 0 104 unless $test
561 0 0 if (not defined $got or not defined $expect)
566 0 0 unless $test
577 0 0 if (defined $$val) { }
578 0 0 if ($type eq 'eq') { }
619 0 0 if (not defined $got or not defined $dont_expect)
624 0 0 unless $test
635 0 0 if (not defined $got or not defined $dont_expect)
640 0 0 unless $test
713 0 32 unless defined $regex
718 32 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) { }
726 0 0 length $opts ? :
737 0 32 unless (defined $usable_regex)
754 0 32 if $cmp eq '!~'
760 0 32 unless ($ok)
761 0 0 defined $this ? :
762 0 0 $cmp eq '=~' ? :
792 0 1488 $numeric_cmps{$type} ? :
814 0 1488 unless ($ok)
815 0 0 if ($type =~ /^(eq|==)$/) { }
828 0 0 defined $got ? :
829 0 0 defined $expect ? :
844 1520 0 if defined $file and defined $line
892 0 0 unless ($$self{'Have_Plan'})
909 0 0 if $self->use_numbers
911 0 0 if length $why
936 0 0 unless ($$self{'Have_Plan'})
953 0 0 if $self->use_numbers
1006 0 3677 if (defined $level)
1041 0 2157 if (defined $use_nums)
1078 0 22 if (defined $no)
1129 0 0 if $self->no_diag
1130 0 0 unless @msgs
1133 0 0 if $^C
1137 0 0 defined $_ ? :
1143 0 0 unless $msg =~ /\n\Z/
1168 0 2168 if $^C
1180 0 2168 unless $msg =~ /\n\Z/
1198 0 0 $self->todo ? :
1234 11 2168 if (defined $fh)
1243 11 0 if (defined $fh)
1252 11 0 if (defined $fh)
1263 33 0 if (_is_fh($file_or_fh)) { }
1268 0 0 unless open $fh, ">$file_or_fh"
1279 0 33 unless defined $maybe_fh
1281 0 33 if ref \$maybe_fh eq 'GLOB'
1319 0 11 if $Opened_Testhandles
1322 0 11 unless open TESTOUT, '>&STDOUT'
1323 0 11 unless open TESTERR, '>&STDERR'
1353 0 0 if (defined $num)
1354 0 0 unless ($$self{'Have_Plan'})
1363 0 0 if ($num > @$test_results) { }
0 0 elsif ($num < @$test_results) { }
1364 0 0 @$test_results ? :
1479 0 2157 unless $pack
1482 0 2157 defined ${$pack . '::TODO';} ? :
1501 3677 0 wantarray ? :
1545 0 33 if ($check)
1599 0 11 if ($$self{'Original_Pid'} != $$ or not $$self{'Have_Plan'} and not $$self{'Test_Died'} or $$self{'Bailed_Out'})
1610 11 0 if (@$test_results) { }
0 0 elsif ($$self{'Skip_All'}) { }
0 0 elsif ($$self{'Test_Died'}) { }
1612 0 11 if ($$self{'No_Plan'})
1613 0 0 unless $self->no_header
1622 0 2157 unless defined $$test_results[$idx]
1631 0 11 if ($num_extra < 0) { }
0 11 elsif ($num_extra > 0) { }
1632 0 0 $$self{'Expected_Tests'} == 1 ? :
1638 0 0 $$self{'Expected_Tests'} == 1 ? :
1644 0 11 if ($num_failed)
1646 0 0 $num_failed == 1 ? :
1648 0 0 $num_extra == 0 ? :
1655 0 11 if ($$self{'Test_Died'})
1660 0 0 if _my_exit(255)
1664 0 11 if ($num_failed) { }
0 11 elsif ($num_extra != 0) { }
1665 0 0 $num_failed <= 254 ? :
1674 11 0 if _my_exit($exit_code)
1677 0 0 if _my_exit(0)
1683 0 0 if _my_exit(255)
1687 0 0 if _my_exit(255)