Branch Coverage

inc/Test/Builder.pm
Criterion Covered Total %
branch 65 266 24.4


line true false branch
14 0 2 if ($] >= 5.008001 and $Test::Builder::Config{'useithreads'} and $INC{'threads.pm'}) { }
24 0 0 if ($type eq 'HASH') { }
0 0 elsif ($type eq 'ARRAY') { }
0 0 elsif ($type eq 'SCALAR') { }
39 0 0 if ($type eq 'HASH') { }
0 0 elsif ($type eq 'ARRAY') { }
0 0 elsif ($type eq 'SCALAR') { }
181 2 0 unless $^C
211 1 2 unless $cmd
215 0 2 if ($self->{'Have_Plan'})
219 0 2 if ($cmd eq 'no_plan') { }
1 1 elsif ($cmd eq 'skip_all') { }
1 0 elsif ($cmd eq 'tests') { }
226 1 0 if ($arg) { }
0 0 elsif (not defined $arg) { }
0 0 elsif (not $arg) { }
259 1 0 if (@_)
260 0 1 unless $max =~ /^\+?\d+$/ and $max > 0
266 1 0 unless $self->no_header
298 0 0 if $self->{'Expected_Tests'}
299 0 0 if $self->{'No_Plan'}
317 1 0 if $reason
322 1 0 unless $self->no_header
343 2 0 if (defined $pack)
375 1 0 $test ? :
385 0 1 if defined $name and $name =~ /^[\d\s]+$/
401 1 0 if ($test) { }
403 0 0 $todo ? :
410 1 0 if $self->use_numbers
412 1 0 if (defined $name) { }
421 0 1 if ($todo) { }
436 0 1 unless ($test)
437 0 0 $todo ? :
438 0 0 if $ENV{'HARNESS_ACTIVE'}
441 0 0 if (defined $name) { }
450 1 0 $test ? :
458 0 2 unless $self->_try(sub { require overload; } )
461 0 2 if ($self->_is_object($$thing))
462 0 0 if (my $string_meth = overload::Method($$thing, $type))
473 0 2 if ref $thing
0 2 $self->_try(sub { $thing->isa('UNIVERSAL') if ref $thing; } ) ? :
489 0 0 unless $self->_is_dualvar($$val)
501 0 0 if $numval != 0 and $numval ne $val
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
562 0 0 if (defined $$val) { }
563 0 0 if ($type eq 'eq') { }
605 0 0 unless (defined $got and defined $dont_expect)
610 0 0 unless $test
621 0 0 unless (defined $got and defined $dont_expect)
626 0 0 unless $test
687 0 0 $numeric_cmps{$type} ? :
709 0 0 unless ($ok)
710 0 0 if ($type =~ /^(eq|==)$/) { }
723 0 0 defined $got ? :
724 0 0 defined $expect ? :
741 0 0 if defined $file and defined $line
811 0 0 if $self->use_numbers
813 0 0 if length $why
852 0 0 if $self->use_numbers
917 0 0 unless defined $regex
922 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) { }
930 0 0 length $opts ? :
942 0 0 if defined &re::is_regexp
952 0 0 unless (defined $usable_regex)
970 0 0 if $cmp eq '!~'
976 0 0 unless ($ok)
977 0 0 defined $this ? :
978 0 0 $cmp eq '=~' ? :
1018 0 4 wantarray ? :
1035 0 6 unless defined $maybe_fh
1037 6 0 if ref $maybe_fh eq 'GLOB'
1038 0 0 if ref \$maybe_fh eq 'GLOB'
1080 0 1 if (defined $level)
1113 0 1 if (defined $use_nums)
1150 0 4 if (defined $no)
1201 0 0 if $self->no_diag
1202 0 0 unless @msgs
1205 0 0 if $^C
1209 0 0 defined $_ ? :
1215 0 0 unless $msg =~ /\n\Z/
1240 0 3 if $^C
1252 0 3 unless $msg =~ /\n\Z/
1273 0 0 $self->todo ? :
1309 2 3 if (defined $fh)
1318 2 0 if (defined $fh)
1327 2 0 if (defined $fh)
1339 6 0 if ($self->is_fh($file_or_fh)) { }
1343 0 0 unless open $fh, '>', $file_or_fh
1383 0 2 if $Opened_Testhandles
1387 0 2 unless open $Testout, '>&STDOUT'
1388 0 2 unless open $Testerr, '>&STDERR'
1404 0 0 if @src_layers
1445 0 1 unless ($self->{'Have_Plan'})
1476 0 0 if (defined $num)
1477 0 0 unless ($self->{'Have_Plan'})
1485 0 0 if ($num > @$test_results) { }
0 0 elsif ($num < @$test_results) { }
1486 0 0 @$test_results ? :
1601 0 1 if defined $self->{'TODO'}
1604 0 1 unless $pack
1607 0 1 defined ${$pack . '::TODO';} ? :
1628 0 1 wantarray ? :
1672 0 6 if ($check)
1713 0 2 if ($self->{'Original_Pid'} != $$)
1719 1 1 unless ($self->{'Have_Plan'})
1724 0 1 if ($self->{'Bailed_Out'})
1730 1 0 if (@$test_results) { }
0 0 elsif ($self->{'Skip_All'}) { }
0 0 elsif ($real_exit_code) { }
1732 0 1 if ($self->{'No_Plan'})
1733 0 0 unless $self->no_header
1742 0 1 unless defined $test_results->[$idx]
1751 0 1 if ($num_extra < 0) { }
0 1 elsif ($num_extra > 0) { }
1752 0 0 $self->{'Expected_Tests'} == 1 ? :
1758 0 0 $self->{'Expected_Tests'} == 1 ? :
1764 0 1 if ($num_failed)
1766 0 0 $num_failed == 1 ? :
1768 0 0 $num_extra == 0 ? :
1775 0 1 if ($real_exit_code)
1780 0 0 if _my_exit(255)
1784 0 1 if ($num_failed) { }
0 1 elsif ($num_extra != 0) { }
1785 0 0 $num_failed <= 254 ? :
1794 1 0 if _my_exit($exit_code)
1797 0 0 if _my_exit(0)
1803 0 0 if _my_exit(255)
1807 0 0 if _my_exit(255)
1812 2 0 if defined $Test and not $Test->no_ending