Branch Coverage

inc/Test/Builder.pm
Criterion Covered Total %
branch 88 252 34.9


line true false branch
19 0 3 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 3 0 unless $^C
225 6 9 if (defined $pack)
247 4 2 unless $cmd
251 0 2 if ($$self{'Have_Plan'})
255 0 2 if ($cmd eq 'no_plan') { }
2 0 elsif ($cmd eq 'skip_all') { }
0 0 elsif ($cmd eq 'tests') { }
262 0 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 2 0 if $reason
358 2 0 unless $self->no_header
387 52 2 $test ? :
397 0 54 if defined $name and $name =~ /^[\d\s]+$/
410 2 52 if (not $test) { }
412 0 2 $todo ? :
419 54 0 if $self->use_numbers
421 54 0 if (defined $name) { }
430 0 54 if ($todo) { }
445 2 52 unless ($test)
446 0 2 $todo ? :
447 2 0 if $ENV{'HARNESS_ACTIVE'}
449 2 0 if (defined $name) { }
458 52 2 $test ? :
468 0 128 unless eval { do { require overload } }
472 0 148 if (_is_object($$thing))
473 0 0 if (my $string_meth = overload::Method($$thing, $type))
485 0 148 if ref $thing
0 148 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 10 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 8 unless defined $regex
715 8 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 8 unless (defined $usable_regex)
751 0 8 if $cmp eq '!~'
757 2 6 unless ($ok)
758 2 0 defined $this ? :
759 2 0 $cmp eq '=~' ? :
789 0 10 $numeric_cmps{$type} ? :
811 0 10 unless ($ok)
812 0 0 if ($type =~ /^(eq|==)$/) { }
825 0 0 defined $got ? :
826 0 0 defined $expect ? :
841 18 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 72 if (defined $level)
1030 0 54 if (defined $use_nums)
1067 0 13 if (defined $no)
1118 0 7 if $self->no_diag
1119 0 7 unless @msgs
1122 0 7 if $^C
1126 7 0 defined $_ ? :
1132 0 7 unless $msg =~ /\n\Z/
1157 0 57 if $^C
1169 0 57 unless $msg =~ /\n\Z/
1190 0 9 $self->todo ? :
1226 3 57 if (defined $fh)
1235 3 9 if (defined $fh)
1244 3 0 if (defined $fh)
1256 9 0 if ($self->_is_fh($file_or_fh)) { }
1261 0 0 unless open $fh, ">$file_or_fh"
1273 0 9 unless defined $maybe_fh
1275 0 9 if ref \$maybe_fh eq 'GLOB'
1313 0 3 if $Opened_Testhandles
1316 0 3 unless open TESTOUT, '>&STDOUT'
1317 0 3 unless open TESTERR, '>&STDERR'
1359 0 54 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 63 unless $pack
1518 0 63 defined ${$pack . '::TODO';} ? :
1537 72 0 wantarray ? :
1581 0 9 if ($check)
1636 2 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 54 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 0 1 $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 3 0 if defined $Test and not $Test->no_ending