Branch Coverage

inc/Test/Builder.pm
Criterion Covered Total %
branch 90 352 25.5


line true false branch
11 0 12 if ($] < 5.008)
22 0 12 if ($] >= 5.008001 and $Test::Builder::Config{'useithreads'} and $INC{'threads.pm'}) { }
32 0 0 if ($type eq 'HASH') { }
0 0 elsif ($type eq 'ARRAY') { }
0 0 elsif ($type eq 'SCALAR') { }
47 0 0 if ($type eq 'HASH') { }
0 0 elsif ($type eq 'ARRAY') { }
0 0 elsif ($type eq 'SCALAR') { }
172 0 0 if ($$self{'Child_Name'})
188 0 0 if ($parent_in_todo)
216 0 0 if ('CODE' ne ref $subtests)
234 0 0 unless $self->_plan_handled
238 0 0 unless (eval { do { &$run_the_subtests() } })
251 0 0 if $error and not eval { do { $error->isa('Test::Builder::Exception') } }
310 0 0 unless $self->parent
311 0 0 if ($$self{'Child_Name'})
324 0 0 if ($$self{'Skip_All'}) { }
0 0 elsif (not @{$$self{'Test_Results'};}) { }
342 0 7 if (@_)
376 0 0 if ($self->parent and $$ == $$self{'Original_Pid'})
484 6 1 unless $cmd
488 0 1 if $$self{'Have_Plan'}
490 1 0 if (my $method = $plan_cmds{$cmd}) { }
506 1 0 if ($arg) { }
0 0 elsif (not defined $arg) { }
534 1 0 if (@_)
535 0 1 unless $max =~ /^\+?\d+$/
541 1 0 unless $self->no_header
557 0 0 if $arg
590 0 1 if $$self{'Have_Output_Plan'}
593 0 1 if defined $directive
594 0 1 if defined $reason
643 0 0 if (defined $num_tests) { }
650 0 0 if ($$self{'Done_Testing'})
658 0 0 if ($self->expected_tests and $num_tests != $self->expected_tests) { }
666 0 0 unless $$self{'Have_Output_Plan'}
671 0 0 if $$self{'Expected_Tests'} != $$self{'Curr_Test'}
674 0 0 if $$self{'Curr_Test'} == 0
693 1 0 if $$self{'Expected_Tests'}
694 0 0 if $$self{'No_Plan'}
710 0 0 $self->parent ? :
712 0 0 unless $self->no_header
713 0 0 if ($self->parent)
735 12 0 if (defined $pack)
765 0 1 if ($$self{'Child_Name'} and not $$self{'In_Destroy'})
766 0 0 unless defined $name
772 0 1 $test ? :
780 0 1 if defined $name and $name =~ /^[\d\s]+$/
789 0 1 if $in_todo
796 1 0 if (not $test) { }
798 0 1 $self->in_todo ? :
805 1 0 if $self->use_numbers
807 1 0 if (defined $name) { }
816 0 1 if ($self->in_todo) { }
831 1 0 unless ($test)
832 0 1 $self->in_todo ? :
833 1 0 if $ENV{'HARNESS_ACTIVE'}
836 1 0 if (defined $name) { }
845 1 0 unless $test or $self->in_todo
850 0 1 $test ? :
860 0 1 unless defined $plan
861 0 1 if $plan =~ /\D/
862 0 1 if $plan < $$self{'Curr_Test'}
873 0 2 if ($self->_is_object($$thing))
874 0 0 if (my $string_meth = overload::Method($$thing, $type))
886 0 2 if ref $thing
0 2 $self->_try(sub { $thing->isa('UNIVERSAL') if ref $thing; } ) ? :
901 0 0 unless $self->_is_dualvar($$val)
913 0 0 if ref $val
917 0 0 $numval ne $val ? :
0 0 if return $numval != 0
944 0 0 unless (defined $got and defined $expect)
949 0 0 unless $test
960 0 0 unless (defined $got and defined $expect)
965 0 0 unless $test
975 0 0 if (defined $$val) { }
976 0 0 if ($type eq 'eq' or $type eq 'ne') { }
1037 0 0 unless (defined $got and defined $dont_expect)
1042 0 0 unless $test
1053 0 0 unless (defined $got and defined $dont_expect)
1058 0 0 unless $test
1132 0 0 $numeric_cmps{$type} ? :
1137 0 0 if $error
1144 0 0 unless ($ok)
1147 0 0 if ($type =~ /^(eq|==)$/) { }
0 0 elsif ($type =~ /^(ne|!=)$/) { }
1163 0 0 defined $got ? :
1164 0 0 defined $expect ? :
1180 0 0 if defined $file and defined $line
1252 0 0 if $self->use_numbers
1254 0 0 if length $why
1292 0 0 if $self->use_numbers
1358 0 0 unless defined $regex
1363 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) { }
1371 0 0 length $opts ? :
1382 0 0 if defined &re::is_regexp
1391 0 0 unless (defined $usable_regex)
1408 0 0 if $cmp eq '!~'
1414 0 0 unless ($ok)
1415 0 0 defined $this ? :
1416 0 0 $cmp eq '=~' ? :
1463 0 28 if $error and $opts{'die_on_fail'}
1465 0 28 wantarray ? :
1482 0 36 unless defined $maybe_fh
1484 36 0 if ref $maybe_fh eq 'GLOB'
1485 0 0 if ref \$maybe_fh eq 'GLOB'
1525 0 12 if (defined $level)
1557 0 1 if (defined $use_nums)
1593 0 17 if (defined $no)
1665 0 5 $self->in_todo ? :
1671 0 4 if $self->no_diag
1672 0 4 unless @msgs
1675 0 4 if $^C
1679 4 0 defined $_ ? :
1710 0 0 ref $_ ? :
1715 0 0 if $dumper->can('Sortkeys')
1744 0 7 if $^C
1756 0 7 unless $msg =~ /\n\z/
1797 12 2 if (defined $fh)
1806 12 5 if (defined $fh)
1815 12 0 if (defined $fh)
1826 36 0 if ($self->is_fh($file_or_fh)) { }
0 0 elsif (ref $file_or_fh eq 'SCALAR') { }
1831 0 0 if ($] >= 5.008) { }
1832 0 0 unless open $fh, '>>', $file_or_fh
1837 0 0 unless $fh = 'Test::Builder::IO::Scalar'->new($file_or_fh)
1842 0 0 unless open $fh, '>', $file_or_fh
1881 0 12 if $$self{'Opened_Testhandles'}
1885 0 12 unless open $Testout, '>&STDOUT'
1886 0 12 unless open $Testerr, '>&STDERR'
1904 24 0 if @src_layers
1914 24 24 if $_ ne 'unix'
1997 0 0 if (defined $num)
2002 0 0 if ($num > @$test_results) { }
0 0 elsif ($num < @$test_results) { }
2003 0 0 @$test_results ? :
2044 14 0 if (@_)
2150 0 1 if defined $$self{'Todo'}
2154 0 1 if defined $todo
2178 0 11 unless $pack
2182 0 11 if $set
2198 0 10 defined $$self{'Todo'} || $self->find_TODO ? :
2246 0 0 @_ ? :
2249 0 0 if ($self->in_todo)
2269 0 0 unless ($$self{'Start_Todo'})
2275 0 0 if ($$self{'Start_Todo'} and @{$$self{'Todo_Stack'};}) { }
2309 1 11 wantarray ? :
2353 0 0 if ($check)
2389 0 12 if $self->no_ending
2390 0 12 if $$self{'Ending'}++
2396 0 12 if ($$self{'Original_Pid'} != $$)
2401 0 12 if (not $$self{'Have_Plan'} and $$self{'Curr_Test'})
2408 11 1 unless ($$self{'Have_Plan'})
2413 0 1 if ($$self{'Bailed_Out'})
2419 1 0 if (@$test_results) { }
0 0 elsif ($$self{'Skip_All'}) { }
0 0 elsif ($real_exit_code) { }
2421 0 1 if ($$self{'No_Plan'})
2422 0 0 unless $self->no_header
2431 0 1 unless defined $$test_results[$idx]
2439 0 1 if ($num_extra != 0)
2440 0 0 $$self{'Expected_Tests'} == 1 ? :
2447 1 0 if ($num_failed)
2449 1 0 $num_failed == 1 ? :
2451 1 0 $num_extra == 0 ? :
2459 0 1 if ($real_exit_code)
2464 0 0 if _my_exit($real_exit_code)
2468 1 0 if ($num_failed) { }
0 0 elsif ($num_extra != 0) { }
2469 1 0 $num_failed <= 254 ? :
2478 1 0 if _my_exit($exit_code)
2481 0 0 if _my_exit(0)
2488 0 0 if _my_exit($real_exit_code)
2493 0 0 if _my_exit(255)
2501 12 0 if defined $Test