blib/lib/Test/Unit/Assertion/Regexp.pm untested

filter: Statementstmt 0.0% 0 / 19 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 35 CC 2 SCAR 11.0
CC
2
Cov
0%
do_assertion
6.0
BEGIN
2.0
new
2.0
CRAP 3.0
1 package Test::Unit::Assertion::Regexp;
2 BEGIN {
3 $Test::Unit::Assertion::Regexp::VERSION = '0.25_1325'; # added by dist-tools/SetVersion.pl
4 }
5  
6 use strict;
7 use Test::Unit::Assertion;
8 use base qw/Test::Unit::Assertion/;
9  
10 sub new {
11 my $class = shift;
12 my $regex = shift;
13  
14 bless \$regex, $class;
15 }
16  
17 sub do_assertion {
18 my $self = shift;
19 my $target = shift;
20 $target =~ $$self or
21 $self->fail(@_ ? $_[0] : "'$target' did not match /$$self/");
22 }
23  
24 sub to_string {
25 my $self = shift;
26 "/$$self/ regexp assertion";
27 }
28  
29 1;
30  
31 __END__