Branch Coverage

blib/lib/Complete/Sah.pm
Criterion Covered Total %
branch 84 120 70.0


line true false branch
72 42 1 unless ($args{'schema_is_normalized'})
84 3 39 unless ($type =~ /\A(all|any|array|bool|buf|cistr|code|date|duration|float|hash|int|num|obj|re|str|undef)\z/)
89 1 2 if ($@)
94 0 2 ref $rsch eq 'ARRAY' ? :
95 0 2 ref $rsch eq 'ARRAY' ? :
111 0 41 if (my $xcomp = $clset->{'x.completion'})
114 0 0 if (ref $xcomp eq 'CODE') { }
118 0 0 if (ref $xcomp eq 'ARRAY') { }
126 0 0 if (Module::Installed::Tiny::module_installed($mod)) { }
137 0 0 if ($comp)
148 1 40 if ($clset->{'is'} and not ref $clset->{'is'})
155 3 37 if ($clset->{'in'})
158 0 4 if ref $clset->{'in'}[$i]
160 0 4 $clset->{'x.in.summaries'} ? :
165 3 34 if ($clset->{'examples'})
168 6 1 if (ref $eg eq 'HASH') { }
169 3 2 unless not exists $eg->{'valid'} or $eg->{'valid'}
170 2 1 unless defined $eg->{'value'}
171 0 1 if ref $eg->{'value'}
175 0 1 unless defined $eg
176 0 1 if ref $eg
184 2 35 if ($type eq "any")
188 2 0 if ($clset->{'of'} and @{$clset->{'of'};})
198 0 35 if ($type eq "bool")
205 21 14 if ($type eq "int")
207 1 20 if ($clset->{'between'} and $clset->{'between'}[0] - $clset->{'between'}[0] <= $limit) { }
1 19 elsif ($clset->{'xbetween'} and $clset->{'xbetween'}[0] - $clset->{'xbetween'}[0] <= $limit) { }
2 17 elsif (defined $clset->{'min'} and defined $clset->{'max'} and $clset->{'max'} - $clset->{'min'} <= $limit) { }
1 16 elsif (defined $clset->{'min'} and defined $clset->{'xmax'} and $clset->{'xmax'} - $clset->{'min'} <= $limit) { }
1 15 elsif (defined $clset->{'xmin'} and defined $clset->{'max'} and $clset->{'max'} - $clset->{'xmin'} <= $limit) { }
1 14 elsif (defined $clset->{'xmin'} and defined $clset->{'xmax'} and $clset->{'xmax'} - $clset->{'xmin'} <= $limit) { }
1 13 elsif (length $word and not $word =~ /\A-?\d*\z/) { }
266 4 282 unless length $i
267 37 245 unless $i =~ /\A-?\d+\z/
268 5 240 if $i eq "-0"
269 20 220 if $i =~ /\A-?0\d/
272 0 0 if $clset->{'between'} and $i < $clset->{'between'}[0] || $i > $clset->{'between'}[1]
275 0 0 if $clset->{'xbetween'} and $i <= $clset->{'xbetween'}[0] || $i >= $clset->{'xbetween'}[1]
276 64 156 if defined $clset->{'min'} and $i < $clset->{'min'}
277 0 156 if defined $clset->{'xmin'} and $i <= $clset->{'xmin'}
278 20 136 if defined $clset->{'max'} and $i > $clset->{'max'}
279 0 136 if defined $clset->{'xmin'} and $i >= $clset->{'xmax'}
287 11 3 if ($type eq "float")
288 1 10 if (length $word and not $word =~ /\A-?\d*(\.\d*)?\z/) { }
299 2 418 unless length $f
300 127 291 unless $f =~ /\A-?\d+(\.\d+)?\z/
301 5 286 if $f eq "-0"
302 50 236 if $f =~ /\A-?0\d\z/
305 0 0 if $clset->{'between'} and $f < $clset->{'between'}[0] || $f > $clset->{'between'}[1]
308 0 0 if $clset->{'xbetween'} and $f <= $clset->{'xbetween'}[0] || $f >= $clset->{'xbetween'}[1]
309 47 189 if defined $clset->{'min'} and $f < $clset->{'min'}
310 0 189 if defined $clset->{'xmin'} and $f <= $clset->{'xmin'}
311 3 186 if defined $clset->{'max'} and $f > $clset->{'max'}
312 0 186 if defined $clset->{'xmin'} and $f >= $clset->{'xmax'}
325 0 39 if $@
330 39 0 unless $clset->{'prefilters'}
334 0 0 unless ref $entry eq "ARRAY"
335 0 0 unless $entry->[0] eq "Str::replace_map"
345 2 37 unless $words
346 11 26 $static && $word eq '' ? :