Branch Coverage

blib/lib/Test/Base.pm
Criterion Covered Total %
branch 152 192 79.1


line true false branch
11 0 104 if ($HAS_PROVIDER) { }
82 8 104 grep(/^-base$/i, @_) ? :
85 102 10 unless (defined $default_class)
93 104 8 unless (grep /^-base$/i, @_)
96 0 112 if ($_[$ii] eq '-package') { }
102 56 48 if @args
130 719 72 if $class->can('new')
132 8 64 if $class->can('new')
134 64 0 if $class->can('new')
139 3 27 if ($$self{'block_list'})
147 79 373 ref $_[0] eq $default_class ? :
156 1 71 if @_ > 1
158 0 71 if @_ and not $_[0] =~ /^[a-zA-Z]\w*$/
165 3 54 $section_name ? :
168 26 31 unless wantarray
170 2 29 if $self->_filters_delay
173 37 21 unless $block->is_filtered
183 29 24 if (@$list == 0)
188 39 14 if (defined $block and not $block->is_filtered)
202 0 2 defined $_[0] ? :
207 0 3 defined $_[0] ? :
237 7 16 if (ref $_[0] eq 'HASH') { }
252 1 0 if eval { do { require Text::Diff; 1 } } and $Text::Diff::VERSION >= 0.35
261 190 0 unless $HAS_PROVIDER
262 190 0 if ($ENV{'TEST_SHOW_NO_DIFFS'} or not defined $actual or not defined $expected or $actual eq $expected or not $self->have_text_diff or not $expected =~ /\n./s) { }
272 0 0 unless defined $name
282 34 7 unless $block->is_filtered
289 27 8 if @_ == 2
290 0 8 unless my $block = $self->first_block
293 0 8 unless $$block{'_section_order'}[0]
295 0 8 unless @names == 2
301 1 34 unless $Have_Plan
305 0 20 unless $Have_Plan or $DIED or not $import_called
314 0 3 unless exists $$block{$x} and exists $$block{$y}
315 3 0 unless $block->is_filtered
316 1 2 if (ref $block->$x) { }
1 1 elsif (ref $block->$y eq 'Regexp') { }
317 1 0 $block->name ? :
321 0 1 ref $y ? :
322 1 0 $block->name ? :
325 1 0 $block->name ? :
336 12 36 unless exists $$block{$x} and exists $$block{$y}
337 17 19 unless $block->is_filtered
338 29 7 $block->name ? :
349 2 6 unless exists $$block{$x} and exists $$block{$y}
350 5 1 unless $block->is_filtered
351 1 5 $block->name ? :
362 1 6 unless exists $$block{$x} and defined $y
363 1 5 unless $block->is_filtered
364 4 2 ref $y ? :
365 4 2 $block->name ? :
376 0 1 unless exists $$block{$x} and defined $y
377 1 0 unless $block->is_filtered
378 0 1 ref $y ? :
379 1 0 $block->name ? :
388 0 3 unless eval "require $module; 1"
405 0 1 unless exists $$block{$x} and exists $$block{$y}
406 1 0 unless $block->is_filtered
407 1 0 $block->name ? :
415 86 1 unless $spec =~ s/\A\s*<<<(.*?)>>>\s*$//ms
419 0 1 if $@
442 3 149 if (exists $$block{'ONLY'})
443 0 3 unless $self->_no_diag_on_only
447 4 145 if exists $$block{'SKIP'}
449 2 143 if (exists $$block{'LAST'})
458 13 241 if $$reserved_section_names{$id} or $id =~ /^_/
468 0 166 unless $hunk =~ s/\A\Q$cd\E[ \t]*(.*)\s+//
473 163 3 unless ($description =~ /\S/)
484 10 231 unless defined $value
485 2 239 unless defined $filters
486 34 207 if ($filters =~ /:(\s|\z)/)
487 1 33 if $value =~ /\S/
490 0 33 unless defined $value
506 20 67 if $self->_spec_string
510 3 64 if (my $spec_file = $self->_spec_file) { }
511 0 3 unless open FILE, $spec_file
530 25 111 if $done
533 0 1385 if $status < 0
534 86 1299 if (/^__(?:END|DATA)__\r?$/)
549 0 8 unless @_
585 0 489 if defined &$accessor
588 0 887 if (@_)
591 4 883 unless $$self{$accessor}
593 259 628 wantarray ? :
608 280 1239 unless defined &$accessor
616 0 142 if $self->is_filtered
623 12 648 $filter =~ s/=(.*)$// ? :
627 39 621 if (defined &$function) { }
628 1 38 @value == 1 && !defined($value[0]) ? :
633 19 20 if (not @value or @value == 1 and defined $value[0] and $value[0] =~ /\A(\d+|)\z/)
636 1 18 if ($value[0] and $_ eq $old)
644 1 620 unless $filter_object->can($filter)
663 12 210 unless ref $map_filters
671 0 665 unless length $filter
672 2 663 if ($filter =~ s/^-//) { }
2 661 elsif ($filter =~ s/^\+//) { }