Branch Coverage

blib/lib/Test/MockPackages/Mock.pm
Criterion Covered Total %
branch 54 54 100.0


line true false branch
89 44 11 exists &$full_name ? :
143 2 15 if (not &looks_like_number($called) or $called < -1)
253 2 30 if (@returns == 1 and do { local $Test::MockPackages::Mock::EVAL_ERROR = undef; eval { do { $returns[0]->isa('Test::MockPackages::Returns') } } }) { }
303 6 53 if ($self->{'_is_method'})
308 29 30 if (my $expects = $self->{'_expects'})
311 6 23 if ($n_expects == 1 and defined $self->{'_called'}) { }
1 22 elsif ($i >= $n_expects) { }
333 32 26 if (my $returns = $self->{'_returns'}) { }
336 9 23 if ($n_returns == 1 and defined $self->{'_called'}) { }
2 21 elsif ($i >= $n_returns) { }
356 2 22 if (@returns == 1 and do { local $Test::MockPackages::Mock::EVAL_ERROR = undef; eval { do { $returns[0]->isa('Test::MockPackages::Returns') } } })
366 16 12 !wantarray && scalar @returns == 1 ? :
373 2 53 if (defined(my $prototype = &sub_prototype(\&{$self->{'_full_name'};})))
396 39 51 $self->{'_expects'} ? :
397 39 51 $self->{'_returns'} ? :
401 22 68 if (defined $called and $called >= 0)
404 2 20 if ($n_expects > 1 or $n_returns > 1)
410 10 78 if ($never)
413 2 7 if ($called or $n_expects or $n_returns)
431 7 48 if $self->{'_never'}
433 14 34 if (defined(my $called = $self->{'_called'}))
434 1 13 if ($called == -1)
441 16 18 $self->{'_expects'} ? :
442 19 15 $self->{'_returns'} ? :
445 28 6 $max >= 1 ? :
461 43 12 if (not $self->{'_corrupt'} and defined $expected_invocations)
469 44 11 if (my $original = $self->{'_original_coderef'}) { }