line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Unit::Assertion::Regexp; |
2
|
|
|
|
|
|
|
BEGIN { |
3
|
2
|
|
|
2
|
|
43
|
$Test::Unit::Assertion::Regexp::VERSION = '0.25_1325'; # added by dist-tools/SetVersion.pl |
4
|
|
|
|
|
|
|
} |
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
8
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
53
|
|
7
|
2
|
|
|
2
|
|
8
|
use Test::Unit::Assertion; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
41
|
|
8
|
2
|
|
|
2
|
|
8
|
use base qw/Test::Unit::Assertion/; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
389
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new { |
11
|
12
|
|
|
12
|
1
|
21
|
my $class = shift; |
12
|
12
|
|
|
|
|
18
|
my $regex = shift; |
13
|
|
|
|
|
|
|
|
14
|
12
|
|
|
|
|
56
|
bless \$regex, $class; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
sub do_assertion { |
18
|
12
|
|
|
12
|
1
|
22
|
my $self = shift; |
19
|
12
|
|
|
|
|
16
|
my $target = shift; |
20
|
12
|
100
|
|
|
|
114
|
$target =~ $$self or |
|
|
100
|
|
|
|
|
|
21
|
|
|
|
|
|
|
$self->fail(@_ ? $_[0] : "'$target' did not match /$$self/"); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub to_string { |
25
|
24
|
|
|
24
|
0
|
34
|
my $self = shift; |
26
|
24
|
|
|
|
|
157
|
"/$$self/ regexp assertion"; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__END__ |