line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Unit::Assertion::Regexp; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
13
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
115
|
|
4
|
2
|
|
|
2
|
|
14
|
use Test::Unit::Assertion; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
52
|
|
5
|
2
|
|
|
2
|
|
12
|
use base qw/Test::Unit::Assertion/; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
504
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub new { |
8
|
10
|
|
|
10
|
1
|
21
|
my $class = shift; |
9
|
10
|
|
|
|
|
18
|
my $regex = shift; |
10
|
|
|
|
|
|
|
|
11
|
10
|
|
|
|
|
52
|
bless \$regex, $class; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub do_assertion { |
15
|
10
|
|
|
10
|
1
|
19
|
my $self = shift; |
16
|
10
|
|
|
|
|
18
|
my $target = shift; |
17
|
10
|
50
|
|
|
|
128
|
$target =~ $$self or |
|
|
100
|
|
|
|
|
|
18
|
|
|
|
|
|
|
$self->fail(@_ ? $_[0] : "'$target' did not match /$$self/"); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub to_string { |
22
|
16
|
|
|
16
|
0
|
24
|
my $self = shift; |
23
|
16
|
|
|
|
|
103
|
"/$$self/ regexp assertion"; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |