Branch Coverage

blib/lib/Lingua/RO/Numbers.pm
Criterion Covered Total %
branch 93 112 83.0


line true false branch
175 4 24 if (exists $opts{$key})
194 0 34 unless ($self->{'diacritics'})
208 3 30 unless (utf8::is_utf8($text))
224 65 2 if (ref $_[0] eq __PACKAGE__)
258 21 62 if (@nums and $i < $nums[0])
263 1 20 if (length $l == length int $l)
272 21 0 if ((my $mod = length($n) % 3) != 0)
292 0 33 unless defined $text
295 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)
342 72 34 if (exists $WORDS{$words[0]}) { }
34 0 elsif ($words[0] =~ s/zeci\z//) { }
0 0 elsif (exists $BIGWORDS{$words[0]}) { }
361 106 0 exists $WORDS{$amount} ? :
364 98 8 if (@words)
365 27 71 if ($words[0] eq "si")
370 85 13 if (@words)
372 21 66 if ($words[0] eq "de")
376 80 7 if (exists $BIGWORDS{$words[0]})
380 2 85 if (@words and $words[0] eq "de")
389 11 95 $adec ? :
392 5 101 if (@words and $words[0] eq $dec_point)
399 0 33 unless @nums
406 5 28 if (@decs)
418 2 31 $neg ? :
427 16 133 if (exists $DIGITS{$number}) { }
0 133 elsif (lc $number eq 'nan') { }
0 133 elsif ($number == 9**9**9) { }
2 131 elsif ($number < 0) { }
5 126 elsif ($number != int $number) { }
87 39 elsif ($number >= $BIGNUMS[0]{'num'}) { }
39 0 elsif ($number > 19 and $number < 100) { }
443 0 5 if (length($number) - length(int $number) - 1 < 1) { }
455 2 14 if $number < 1
464 710 87 unless $number >= $BIGNUMS[$j - 1]{'num'} and $number <= $BIGNUMS[$j]{'num'}
469 28 59 $cat <= 2 ? :
471 29 30 exists $DIGITS{$cat} ? :
473 30 29 if (@w > 2)
474 2 28 if $w[-2] eq $DIGITS{'2'}
479 26 61 if ($cat >= 100 and $cat < 1000)
481 5 19 if (@of and $rest != 0 and exists $DIGITS{$rest})
489 17 5 $BIGNUMS[$j - 1]{'fem'} ? :
6 59 $cat == 2 ? :
22 65 $cat == 1 ? :
491 73 14 if ($number > 0)
492 34 39 if $BIGNUMS[$j]{'num'} > 1000
501 4 23 $cat == 6 ? :
12 27 $cat == 2 ? :
503 32 7 if $number % 10 != 0
509 34 0 @words ? :
115 34 wantarray ? :