Condition Coverage

blib/lib/Mock/Data/Regex.pm
Criterion Covered Total %
condition 65 117 55.5


and 3 conditions

line !l l&&!r l&&r condition
20 2 0 20 @_ == 1 && (!ref($_[0]) || ref $_[0] eq 'Regexp')
86 0 96 109 $self->regex_parse_tree->generate($out) and !$out->next_req || grep(($_ eq ''), @{$out->next_req;})
95 0 13 6 $prefix and !$out->start || $out->start eq 'LF'
102 0 12 7 $suffix and !$out->next_req || grep(($_ eq "\n"), @{$out->next_req;}) && !$out->require->[1]
118 0 0 0 &Scalar::Util::blessed($p) && $p->isa('Mock::Data::Charset')
153 115 0 0 $flags->{'x'} and /\G ( \s | [#].* ) /cgx
229 69 1 5 $1 and defined(my $equiv = $_parse_regex_backslash{$2})
234 72 0 3 $flags->{'i'} and uc $ch ne lc $ch
37 13 22 @$expr and not ref $expr->[-1]
311 0 0 0 defined $rep->[$_] && defined $val->[$_]
335 16 16 339 $success &&= ref $_ ? $_->generate($out) : $out->append($_)
424 0 0 0 length $_ == 0 and $self->min_repetition == 0
425 0 0 0 length $_ == 1 and $self->pattern->has_member($_)
0 0 0 length $_ > 1 and not grep((!$self->pattern->has_member($_)), split(//, $_, 0))
452 0 19 13 $self->{'start'} eq 'LF' and substr($out->str, -1) eq "\n"
455 13 0 19 length $out->str == 0 and not $out->start
505 930 102 0 $_[0]{'require'} && $_[0]{'require'}[0]
515 16 16 0 length $_ and $content eq $_

or 2 conditions

line l !l condition
38 1 2 $self{'max_codepoint'} //= 127
131 91 0 shift() || {}
202 2 1 $2 || 0
2 0 $2 || 0
227 6 69 $1 or ''
479 0 205 $self->{'str'} //= ''
493 121 0 $self->opts->{'max_repetition'} // '+8'

or 3 conditions

line l !l&&r !l&&!r condition
37 0 22 0 $self{'regex_parse_tree'} ||= $class->parse($self{'regex'})
40 0 0 0 $self{'prefix'} //= Mock::Data::Util::coerce_generator($self{'prefix'})
41 0 0 0 $self{'suffix'} //= Mock::Data::Util::coerce_generator($self{'suffix'})
80 2 24 179 $opts{'max_codepoint'} //= $self->max_codepoint
81 2 4 199 $opts{'min_codepoint'} //= $self->min_codepoint
82 0 205 0 $opts{'max_repetition'} //= $self->max_repetition
86 166 39 0 !$out->next_req || grep(($_ eq ''), @{$out->next_req;})
88 19 0 186 $opts{'prefix'} // $self->{'prefix'}
89 19 0 186 $opts{'suffix'} // $self->{'suffix'}
90 19 0 186 defined $prefix or defined $suffix
95 18 1 0 !$out->start || $out->start eq 'LF'
102 16 2 1 !$out->next_req || grep(($_ eq "\n"), @{$out->next_req;}) && !$out->require->[1]
248 25 10 53 @$expr > 1 || !ref($expr->[0])
425 0 0 0 length $_ == 1 and $self->pattern->has_member($_) or length $_ > 1 and not grep((!$self->pattern->has_member($_)), split(//, $_, 0))
452 19 13 19 length $out->str == 0 or $self->{'start'} eq 'LF' and substr($out->str, -1) eq "\n"

xor 4 conditions

line l&&r l&&!r !l&&r !l&&!r condition
27 0 0 0 0 $self{'regex'} == $class->{'regex'} xor $self{'regex_parse_tree'} == $class->{'regex_parse_tree'}