Branch Coverage

support/Test/Builder.pm
Criterion Covered Total %
branch 80 256 31.2


line true false branch
18 0 14 if ($] >= 5.008 and $Test::Builder::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 14 0 unless $^C
225 28 0 if (defined $pack)
247 16 14 unless $cmd
249 0 14 if ($self->{'Have_Plan'})
254 0 14 if ($cmd eq 'no_plan') { }
1 13 elsif ($cmd eq 'skip_all') { }
13 0 elsif ($cmd eq 'tests') { }
261 13 0 if ($arg) { }
0 0 elsif (not defined $arg) { }
0 0 elsif (not $arg) { }
295 13 0 if (@_)
296 0 13 unless $max =~ /^\+?\d+$/ and $max > 0
302 13 0 unless $self->no_header
334 0 0 if $self->{'Expected_Tests'}
335 0 0 if $self->{'No_Plan'}
353 1 0 if $reason
358 1 0 unless $self->no_header
387 35206 0 $test ? :
389 0 35206 unless ($self->{'Have_Plan'})
400 0 35206 if defined $name and $name =~ /^[\d\s]+$/
413 35206 0 if ($test) { }
415 0 0 $todo ? :
422 35206 0 if $self->use_numbers
424 20230 14976 if (defined $name) { }
433 0 35206 if ($todo) { }
448 0 35206 unless ($test)
449 0 0 $todo ? :
450 0 0 if $ENV{'HARNESS_ACTIVE'}
452 0 0 if (defined $name) { }
461 35206 0 $test ? :
471 0 152708 unless eval { do { require overload } }
475 80 234844 if (_is_object($$thing))
476 0 80 if (my $string_meth = overload::Method($$thing, $type))
488 2594 232330 if ref $thing
80 234844 eval { do { $thing->isa('UNIVERSAL') if ref $thing } } ? :
504 0 0 unless $self->_is_dualvar($$val)
516 0 0 if $numval != 0 and $numval ne $val
543 104 34407 unless (defined $got and defined $expect)
548 0 104 unless $test
561 0 0 unless (defined $got and defined $expect)
566 0 0 unless $test
577 0 0 if (defined $$val) { }
578 0 0 if ($type eq 'eq') { }
619 0 0 unless (defined $got and defined $dont_expect)
624 0 0 unless $test
635 0 0 unless (defined $got and defined $dont_expect)
640 0 0 unless $test
713 0 34 unless defined $regex
718 34 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 34 unless (defined $usable_regex)
754 0 34 if $cmp eq '!~'
760 0 34 unless ($ok)
761 0 0 defined $this ? :
762 0 0 $cmp eq '=~' ? :
792 0 34407 $numeric_cmps{$type} ? :
814 0 34407 unless ($ok)
815 0 0 if ($type =~ /^(eq|==)$/) { }
828 0 0 defined $got ? :
829 0 0 defined $expect ? :
844 34441 0 if defined $file and defined $line
892 0 80 unless ($self->{'Have_Plan'})
909 80 0 if $self->use_numbers
911 80 0 if length $why
936 0 0 unless ($self->{'Have_Plan'})
953 0 0 if $self->use_numbers
1006 0 69647 if (defined $level)
1041 0 35286 if (defined $use_nums)
1078 0 28 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 35300 if $^C
1180 0 35300 unless $msg =~ /\n\Z/
1198 0 0 $self->todo ? :
1234 14 35300 if (defined $fh)
1243 14 0 if (defined $fh)
1252 14 0 if (defined $fh)
1263 42 0 if (_is_fh($file_or_fh)) { }
1268 0 0 unless open $fh, ">$file_or_fh"
1279 0 42 unless defined $maybe_fh
1281 0 42 if ref \$maybe_fh eq 'GLOB'
1319 0 14 if $Opened_Testhandles
1322 0 14 unless open TESTOUT, '>&STDOUT'
1323 0 14 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 35206 unless $pack
1482 0 35206 defined ${$pack . '::TODO';} ? :
1501 69647 0 wantarray ? :
1545 0 42 if ($check)
1599 1 13 if ($self->{'Original_Pid'} != $$ or not $self->{'Have_Plan'} || $self->{'Test_Died'} or $self->{'Bailed_Out'})
1610 13 0 if (@$test_results) { }
0 0 elsif ($self->{'Skip_All'}) { }
0 0 elsif ($self->{'Test_Died'}) { }
1612 0 13 if ($self->{'No_Plan'})
1613 0 0 unless $self->no_header
1622 0 35286 unless defined $test_results->[$idx]
1631 0 13 if ($num_extra < 0) { }
0 13 elsif ($num_extra > 0) { }
1632 0 0 $self->{'Expected_Tests'} == 1 ? :
1638 0 0 $self->{'Expected_Tests'} == 1 ? :
1644 0 13 if ($num_failed)
1646 0 0 $num_failed == 1 ? :
1648 0 0 $num_extra == 0 ? :
1655 0 13 if ($self->{'Test_Died'})
1660 0 0 if _my_exit(255)
1664 0 13 if ($num_failed) { }
0 13 elsif ($num_extra != 0) { }
1665 0 0 $num_failed <= 254 ? :
1674 13 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)
1692 14 0 if defined $Test and not $Test->no_ending