Condition Coverage

blib/lib/Mock/Data/Regex.pm
Criterion Covered Total %
condition 65 120 54.1


and 3 conditions

line !l l&&!r l&&r condition
20 2 0 22 @_ == 1 && (!ref($_[0]) || ref $_[0] eq 'Regexp')
86 0 100 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 builtin::blessed($p) && $p->isa('Mock::Data::Charset')
136 161 0 0 $flags->{'x'} and /\G ( \s | [#].* ) /cgx
140 0 0 0 $] < "5.02" and /\G (\w*)-\w* : /cgx
230 101 12 5 $1 and defined(my $equiv = $_parse_regex_backslash{$2})
235 115 0 3 $flags->{'i'} and uc $ch ne lc $ch
45 17 53 @$expr and not ref $expr->[-1]
312 0 0 0 defined $rep->[$_] && defined $val->[$_]
336 18 18 318 $success &&= ref $_ ? $_->generate($out) : $out->append($_)
425 0 0 0 length $_ == 0 and $self->min_repetition == 0
426 0 0 0 length $_ == 1 and $self->pattern->has_member($_)
0 0 0 length $_ > 1 and not grep((!$self->pattern->has_member($_)), split(//, $_, 0))
453 0 14 14 $self->{'start'} eq "LF" and substr($out->str, -1) eq "\n"
456 14 0 19 length $out->str == 0 and not $out->start
506 927 104 0 $_[0]{'require'} && $_[0]{'require'}[0]
516 18 18 0 length $_ and $content eq $_

or 2 conditions

line l !l condition
38 1 2 $self{'max_codepoint'} //= 127
131 105 0 shift() || {}
203 2 1 $2 || 0
2 0 $2 || 0
228 17 101 $1 or ""
480 0 209 $self->{'str'} //= ""
494 132 0 $self->opts->{'max_repetition'} // "+8"

or 3 conditions

line l !l&&r !l&&!r condition
37 0 24 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 183 $opts{'max_codepoint'} //= $self->max_codepoint
81 2 4 203 $opts{'min_codepoint'} //= $self->min_codepoint
82 0 209 0 $opts{'max_repetition'} //= $self->max_repetition
86 170 39 0 !$out->next_req || grep(($_ eq ''), @{$out->next_req;})
88 19 0 190 $opts{'prefix'} // $self->{'prefix'}
89 19 0 190 $opts{'suffix'} // $self->{'suffix'}
90 19 0 190 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]
249 28 10 62 @$expr > 1 || !ref($expr->[0])
426 0 0 0 length $_ == 1 and $self->pattern->has_member($_) or length $_ > 1 and not grep((!$self->pattern->has_member($_)), split(//, $_, 0))
453 19 14 14 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'}