Branch Coverage

blib/lib/Test/Mocha.pm
Criterion Covered Total %
branch 70 70 100.0


line true false branch
60 1 34 if ref $_ ne 'CODE'
78 19 2 if @return_values == 1
80 1 1 if @return_values > 1
89 1 9 if blessed($exception[0]) and $exception[0]->can('throw')
109 56 126 if (@_ == 1) { }
63 63 elsif (@_ == 2) { }
35 28 elsif (@_ == 3) { }
110 20 36 if (ref $_[0] eq 'CODE') { }
118 35 28 if (ref $_[0] eq 'CODE') { }
133 63 113 if (defined $class)
142 1 62 unless defined $options{$class}
145 53 9 if ($class ne 'between') { }
146 3 50 unless Num->check($value)
150 4 5 unless NumRange->check($value)
171 1 102 unless Num->check($n)
183 1 3 unless Num->check($n)
194 1 3 unless Num->check($n)
205 2 5 unless NumRange->check([$lower, $upper])
223 1 43 unless MockType->check($mock)
234 10 43 if @_ % 2 == 1
238 19 34 if keys %options == 0
241 1 52 unless keys %options == 1
245 34 18 if (defined $options{'times'}) { }
4 14 elsif (defined $options{'at_least'}) { }
4 10 elsif (defined $options{'at_most'}) { }
9 1 elsif (defined $options{'between'}) { }
246 1 33 unless Num->check($options{'times'})
250 1 3 unless Num->check($options{'at_least'})
254 1 3 unless Num->check($options{'at_most'})
258 4 5 unless NumRange->check($options{'between'})
266 10 34 if defined $test_name
285 2 2 unless MockType->check($mock)
296 4 2 if not @mocks or grep {not MockType->check($_);} @mocks
325 1 2 if defined ${$caller_pkg . '::INC';}{$module_file}
329 1 1 if defined *{$mocked_class . '::AUTOLOAD';}{'CODE'}