Branch Coverage

inc/Test/Builder.pm
Criterion Covered Total %
branch 104 252 41.2


line true false branch
19 0 18 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 18 0 unless $^C
225 36 10 if (defined $pack)
247 3 2 unless $cmd
251 0 2 if ($self->{'Have_Plan'})
255 0 2 if ($cmd eq 'no_plan') { }
1 1 elsif ($cmd eq 'skip_all') { }
1 0 elsif ($cmd eq 'tests') { }
262 1 0 if ($arg) { }
0 0 elsif (not defined $arg) { }
0 0 elsif (not $arg) { }
295 16 0 if (@_)
296 0 16 unless $max =~ /^\+?\d+$/ and $max > 0
302 16 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 37 2 $test ? :
397 0 39 if defined $name and $name =~ /^[\d\s]+$/
410 37 2 if ($test) { }
412 0 2 $todo ? :
419 39 0 if $self->use_numbers
421 39 0 if (defined $name) { }
430 0 39 if ($todo) { }
445 2 37 unless ($test)
446 0 2 $todo ? :
447 2 0 if $ENV{'HARNESS_ACTIVE'}
449 2 0 if (defined $name) { }
458 37 2 $test ? :
468 0 165 unless eval { do { require overload } }
472 5 247 if (_is_object($$thing))
473 5 0 if (my $string_meth = overload::Method($$thing, $type))
485 43 209 if ref $thing
5 247 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 1 26 unless (defined $got and defined $expect)
545 0 1 unless $test
558 0 0 unless (defined $got and defined $expect)
563 0 0 unless $test
574 2 0 if (defined $$val) { }
575 2 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 4 unless defined $regex
715 4 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 4 unless (defined $usable_regex)
751 0 4 if $cmp eq '!~'
757 1 3 unless ($ok)
758 1 0 defined $this ? :
759 1 0 $cmp eq '=~' ? :
789 0 26 $numeric_cmps{$type} ? :
811 1 25 unless ($ok)
812 1 0 if ($type =~ /^(eq|==)$/) { }
825 0 0 defined $got ? :
826 0 0 defined $expect ? :
841 30 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 69 if (defined $level)
1030 0 39 if (defined $use_nums)
1067 0 44 if (defined $no)
1118 0 8 if $self->no_diag
1119 0 8 unless @msgs
1122 0 8 if $^C
1126 8 0 defined $_ ? :
1132 0 8 unless $msg =~ /\n\Z/
1157 0 57 if $^C
1169 0 57 unless $msg =~ /\n\Z/
1190 0 10 $self->todo ? :
1226 18 57 if (defined $fh)
1235 18 10 if (defined $fh)
1244 18 0 if (defined $fh)
1256 54 0 if ($self->_is_fh($file_or_fh)) { }
1261 0 0 unless open $fh, ">$file_or_fh"
1273 0 54 unless defined $maybe_fh
1275 0 54 if ref \$maybe_fh eq 'GLOB'
1313 0 18 if $Opened_Testhandles
1316 0 18 unless open TESTOUT, '>&STDOUT'
1317 0 18 unless open TESTERR, '>&STDERR'
1359 0 39 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 49 unless $pack
1518 0 49 defined ${$pack . '::TODO';} ? :
1537 69 0 wantarray ? :
1581 0 54 if ($check)
1636 2 16 if ($self->{'Original_Pid'} != $$ or not $self->{'Have_Plan'} || $self->{'Test_Died'} or $self->{'Bailed_Out'})
1647 16 0 if (@$test_results) { }
0 0 elsif ($self->{'Skip_All'}) { }
0 0 elsif ($self->{'Test_Died'}) { }
1649 0 16 if ($self->{'No_Plan'})
1650 0 0 unless $self->no_header
1659 0 39 unless defined $test_results->[$idx]
1668 0 16 if ($num_extra < 0) { }
0 16 elsif ($num_extra > 0) { }
1669 0 0 $self->{'Expected_Tests'} == 1 ? :
1675 0 0 $self->{'Expected_Tests'} == 1 ? :
1681 2 14 if ($num_failed)
1683 2 0 $num_failed == 1 ? :
1685 2 0 $num_extra == 0 ? :
1692 0 16 if ($self->{'Test_Died'})
1697 0 0 if _my_exit(255)
1701 2 14 if ($num_failed) { }
0 14 elsif ($num_extra != 0) { }
1702 2 0 $num_failed <= 254 ? :
1711 16 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 18 0 if defined $Test and not $Test->no_ending