Branch Coverage

blib/lib/Lingua/RO/Numbers.pm
Criterion Covered Total %
branch 93 110 84.5


line true false branch
163 4 24 if (exists $opts{$key})
180 33 1 if (ref $_[0] eq 'Lingua::RO::Numbers') { }
190 0 34 unless ($$self{'diacritics'})
203 32 1 if (ref $_[0] eq 'Lingua::RO::Numbers') { }
217 33 0 $] >= 5.0080001 ? :
3 30 unless ($] >= 5.0080001 ? utf8::is_utf8($text) : do { require Encode; Encode::is_utf8($text) })
254 22 60 if (@nums and $i < $nums[0])
259 1 21 if (length $l == length int $l)
268 22 0 if ((my $mod = length($n) % 3) != 0)
289 0 33 unless (defined $text)
294 0 33 if (defined $$self{'thousands_separator'} and length $$self{'thousands_separator'})
313 33 0 if (@words)
316 2 31 if ($words[0] eq $neg_sign)
322 1 32 if (@words == 1)
326 0 1 if ($words[0] eq $inf)
327 0 0 $neg ? :
332 0 1 if ($words[0] eq $nan)
363 106 0 exists $WORDS{$amount} ? :
369 101 5 if (@words)
370 32 69 if ($words[0] eq 'si')
375 85 16 if (@words)
377 21 66 if ($words[0] eq 'de')
381 80 7 if (exists $BIGWORDS{$words[0]})
385 2 85 if (@words and $words[0] eq 'de')
394 11 95 $adec ? :
397 5 101 if (@words and $words[0] eq $dec_point)
404 0 33 unless @nums
411 5 28 if (@decs)
423 2 31 $neg ? :
432 15 135 if (exists $DIGITS{$number}) { }
0 135 elsif (lc $number eq 'nan') { }
0 135 elsif ($number == 9**9**9) { }
2 133 elsif ($number < 0) { }
5 128 elsif ($number != int $number) { }
87 41 elsif ($number >= $BIGNUMS[0]{'num'}) { }
41 0 elsif ($number > 19 and $number < 100) { }
448 0 5 if (length($number) - length(int $number) - 1 < 1) { }
460 2 14 if $number < 1
469 87 713 if ($number >= $BIGNUMS[$j - 1]{'num'} and $number <= $BIGNUMS[$j]{'num'})
473 26 61 $cat <= 2 ? :
474 30 31 exists $DIGITS{$cat} ? :
475 31 30 if (@w > 2)
476 4 27 if $w[-2] eq $DIGITS{'2'}
481 27 60 if ($cat >= 100 and $cat < 1000)
483 6 21 if (@of and $rest != 0 and exists $DIGITS{$rest})
488 15 5 $BIGNUMS[$j - 1]{'fem'} ? :
6 61 $cat == 2 ? :
20 67 $cat == 1 ? :
493 73 14 if ($number > 0)
494 33 40 if $BIGNUMS[$j]{'num'} > 1000
504 4 27 $cat == 6 ? :
10 31 $cat == 2 ? :
37 4 $number % 10 != 0 ? :
511 34 0 @words ? :
116 34 wantarray ? :