Branch Coverage

inc/Test/Builder.pm
Criterion Covered Total %
branch 60 278 21.5


line true false branch
16 0 1 if ($] >= 5.008001 and $Test::Builder::Config{'useithreads'} and $INC{'threads.pm'}) { }
26 0 0 if ($type eq 'HASH') { }
0 0 elsif ($type eq 'ARRAY') { }
0 0 elsif ($type eq 'SCALAR') { }
41 0 0 if ($type eq 'HASH') { }
0 0 elsif ($type eq 'ARRAY') { }
0 0 elsif ($type eq 'SCALAR') { }
214 0 1 unless $cmd
219 0 1 if $self->{'Have_Plan'}
221 0 1 if ($cmd eq 'no_plan') { }
0 1 elsif ($cmd eq 'skip_all') { }
1 0 elsif ($cmd eq 'tests') { }
222 0 0 if $arg
229 1 0 if ($arg) { }
0 0 elsif (not defined $arg) { }
262 1 0 if (@_)
263 0 1 unless $max =~ /^\+?\d+$/
269 1 0 unless $self->no_header
302 0 0 if $self->{'Expected_Tests'}
303 0 0 if $self->{'No_Plan'}
320 0 0 if $reason
325 0 0 unless $self->no_header
345 1 0 if (defined $pack)
377 1 0 $test ? :
387 0 1 if defined $name and $name =~ /^[\d\s]+$/
396 0 1 if $in_todo
403 1 0 if ($test) { }
405 0 0 $self->in_todo ? :
412 1 0 if $self->use_numbers
414 1 0 if (defined $name) { }
423 0 1 if ($self->in_todo) { }
438 0 1 unless ($test)
439 0 0 $self->in_todo ? :
440 0 0 if $ENV{'HARNESS_ACTIVE'}
443 0 0 if (defined $name) { }
452 1 0 $test ? :
459 0 2 unless $self->_try(sub { require overload; } )
462 0 2 if ($self->_is_object($$thing))
463 0 0 if (my $string_meth = overload::Method($$thing, $type))
475 0 2 if ref $thing
0 2 $self->_try(sub { $thing->isa('UNIVERSAL') if ref $thing; } ) ? :
490 0 0 unless $self->_is_dualvar($$val)
503 0 0 $numval ne $val ? :
0 0 if return $numval != 0
528 0 0 unless (defined $got and defined $expect)
533 0 0 unless $test
546 0 0 unless (defined $got and defined $expect)
551 0 0 unless $test
561 0 0 if (defined $$val) { }
562 0 0 if ($type eq 'eq' or $type eq 'ne') { }
623 0 0 unless (defined $got and defined $dont_expect)
628 0 0 unless $test
639 0 0 unless (defined $got and defined $dont_expect)
644 0 0 unless $test
702 0 0 $numeric_cmps{$type} ? :
726 0 0 unless ($ok)
727 0 0 if ($type =~ /^(eq|==)$/) { }
0 0 elsif ($type =~ /^(ne|!=)$/) { }
743 0 0 defined $got ? :
744 0 0 defined $expect ? :
760 0 0 if defined $file and defined $line
831 0 0 if $self->use_numbers
833 0 0 if length $why
873 0 0 if $self->use_numbers
936 0 0 unless defined $regex
941 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) { }
949 0 0 length $opts ? :
960 0 0 if defined &re::is_regexp
969 0 0 unless (defined $usable_regex)
990 0 0 if $cmp eq '!~'
996 0 0 unless ($ok)
997 0 0 defined $this ? :
998 0 0 $cmp eq '=~' ? :
1040 0 4 wantarray ? :
1057 0 3 unless defined $maybe_fh
1059 3 0 if ref $maybe_fh eq 'GLOB'
1060 0 0 if ref \$maybe_fh eq 'GLOB'
1101 0 3 if (defined $level)
1133 0 1 if (defined $use_nums)
1169 0 2 if (defined $no)
1241 0 0 $self->in_todo ? :
1247 0 0 if $self->no_diag
1248 0 0 unless @msgs
1251 0 0 if $^C
1255 0 0 defined $_ ? :
1286 0 0 ref $_ ? :
1291 0 0 if $dumper->can('Sortkeys')
1320 0 2 if $^C
1331 0 2 unless $msg =~ /\n\Z/
1368 1 2 if (defined $fh)
1377 1 0 if (defined $fh)
1386 1 0 if (defined $fh)
1397 3 0 if ($self->is_fh($file_or_fh)) { }
1401 0 0 unless open $fh, '>', $file_or_fh
1442 0 1 if $Opened_Testhandles
1446 0 1 unless open $Testout, '>&STDOUT'
1447 0 1 unless open $Testerr, '>&STDERR'
1465 0 0 if @src_layers
1527 0 1 unless ($self->{'Have_Plan'})
1560 0 0 if (defined $num)
1562 0 0 unless $self->{'Have_Plan'}
1568 0 0 if ($num > @$test_results) { }
0 0 elsif ($num < @$test_results) { }
1569 0 0 @$test_results ? :
1688 0 1 if defined $self->{'Todo'}
1692 0 1 if defined $todo
1711 0 3 unless $pack
1729 0 2 defined $self->{'Todo'} || $self->find_TODO ? :
1777 0 0 @_ ? :
1780 0 0 if ($self->in_todo)
1800 0 0 unless ($self->{'Start_Todo'})
1806 0 0 if ($self->{'Start_Todo'} and @{$self->{'Todo_Stack'};}) { }
1833 0 3 wantarray ? :
1879 0 3 if ($check)
1921 0 1 if ($self->{'Original_Pid'} != $$)
1927 0 1 unless ($self->{'Have_Plan'})
1932 0 1 if ($self->{'Bailed_Out'})
1938 1 0 if (@$test_results) { }
0 0 elsif ($self->{'Skip_All'}) { }
0 0 elsif ($real_exit_code) { }
1940 0 1 if ($self->{'No_Plan'})
1941 0 0 unless $self->no_header
1950 0 1 unless defined $test_results->[$idx]
1958 0 1 if ($num_extra != 0)
1959 0 0 $self->{'Expected_Tests'} == 1 ? :
1965 0 1 if ($num_failed)
1967 0 0 $num_failed == 1 ? :
1969 0 0 $num_extra == 0 ? :
1976 0 1 if ($real_exit_code)
1981 0 0 if _my_exit($real_exit_code)
1985 0 1 if ($num_failed) { }
0 1 elsif ($num_extra != 0) { }
1986 0 0 $num_failed <= 254 ? :
1995 1 0 if _my_exit($exit_code)
1998 0 0 if _my_exit(0)
2004 0 0 if _my_exit($real_exit_code)
2008 0 0 if _my_exit(255)
2015 1 0 if defined $Test and not $Test->no_ending