Branch Coverage

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


line true false branch
88 42 11 exists &$full_name ? :
142 2 15 if (not &looks_like_number($called) or $called < -1)
252 2 28 if (@returns == 1 and do { local $Test::MockPackages::Mock::EVAL_ERROR = undef; eval { do { $returns[0]->isa('Test::MockPackages::Returns') } } }) { }
302 6 51 if ($self->{'_is_method'})
307 27 30 if (my $expects = $self->{'_expects'})
310 6 21 if ($n_expects == 1 and defined $self->{'_called'}) { }
1 20 elsif ($i >= $n_expects) { }
332 30 26 if (my $returns = $self->{'_returns'}) { }
335 9 21 if ($n_returns == 1 and defined $self->{'_called'}) { }
2 19 elsif ($i >= $n_returns) { }
355 2 20 if (@returns == 1 and do { local $Test::MockPackages::Mock::EVAL_ERROR = undef; eval { do { $returns[0]->isa('Test::MockPackages::Returns') } } })
365 14 12 !wantarray && scalar @returns == 1 ? :
390 37 49 $self->{'_expects'} ? :
391 35 51 $self->{'_returns'} ? :
395 22 64 if (defined $called and $called >= 0)
398 2 20 if ($n_expects > 1 or $n_returns > 1)
404 10 74 if ($never)
407 2 7 if ($called or $n_expects or $n_returns)
425 7 46 if $self->{'_never'}
427 14 32 if (defined(my $called = $self->{'_called'}))
428 1 13 if ($called == -1)
435 14 18 $self->{'_expects'} ? :
436 17 15 $self->{'_returns'} ? :
439 26 6 $max >= 1 ? :
455 41 12 if (not $self->{'_corrupt'} and defined $expected_invocations)
463 42 11 if (my $original = $self->{'_original_coderef'}) { }