line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Mocha::CalledOk::Between; |
2
|
|
|
|
|
|
|
# ABSTRACT: Concrete subclass of CalledOk for verifying methods called 'between' a min and max number of times |
3
|
|
|
|
|
|
|
$Test::Mocha::CalledOk::Between::VERSION = '0.61'; |
4
|
21
|
|
|
21
|
|
75
|
use strict; |
|
21
|
|
|
|
|
26
|
|
|
21
|
|
|
|
|
533
|
|
5
|
21
|
|
|
21
|
|
73
|
use warnings; |
|
21
|
|
|
|
|
20
|
|
|
21
|
|
|
|
|
416
|
|
6
|
21
|
|
|
21
|
|
71
|
use parent 'Test::Mocha::CalledOk'; |
|
21
|
|
|
|
|
17
|
|
|
21
|
|
|
|
|
77
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub is { |
9
|
|
|
|
|
|
|
# uncoverable pod |
10
|
15
|
|
|
15
|
0
|
23
|
my ( $class, $got, $exp ) = @_; |
11
|
15
|
|
100
|
|
|
74
|
return $exp->[0] <= $got && $got <= $exp->[1]; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub stringify { |
15
|
|
|
|
|
|
|
# uncoverable pod |
16
|
15
|
|
|
15
|
0
|
17
|
my ( $class, $exp ) = @_; |
17
|
15
|
|
|
|
|
57
|
return "between $exp->[0] and $exp->[1] time(s)"; |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
1; |