Condition Coverage

blib/lib/Lingua/IND/Nums2Words.pm
Criterion Covered Total %
condition 50 75 66.6


and 2 conditions

line l !l condition
102 0 13 $num =~ /^(.+)(?:\Q$Dec_char\E)?$/ou and @words = n2w3($1)
153 16 6 $n3 > 1 and @words = ($Digit_words{$n3}, "ratus")

and 3 conditions

line !l l&&!r l&&r condition
78 13 0 0 $num =~ /^(.+)[Ee](.+)$/u and @words = (n2w2($1), $Exp_word, n2w2($2))
102 13 0 0 $num =~ /^(.+)\Q$Dec_char\E(.+)$/ou and @words = (n2w3($1), $Dec_word, n2w5($2))
13 0 0 $num =~ /^\Q$Dec_char\E(.+)$/ou and @words = ($Digit_words{'0'}, $Dec_word, n2w5($1))
150 2 3 1 $n1 == 1 and $order == 1
5 0 1 $n1 == 1 and $order == 1 and @words = "se"
9 2 14 $n3 == 0 and $n2 == 0
11 8 6 $n3 == 0 and $n2 == 0 and $n1 > 0
153 22 0 3 $n3 == 1 and @words = "seratus"
158 0 0 1 $n1 == 0 and push @words, "sepuluh"
0 0 0 $n1 == 1 and push @words, "sebelas"
167 16 6 3 $n3 > 0 and $n2 == 0
22 3 0 $n3 > 0 and $n2 == 0 and $n1 > 0

or 2 conditions

line l !l condition
72 14 1 shift() // (return "")
89 13 0 shift() // (return "")
117 13 0 shift() // (return "")
125 24 1 $t || 0
140 25 0 shift() // (return "")
150 1 3 $n1 == 1 and $order == 1 and @words = "se" or @words = $Digit_words{$n1}
176 5 1 shift() // (return "")

or 3 conditions

line l !l&&r !l&&!r condition
102 0 0 13 $num =~ /^(.+)\Q$Dec_char\E(.+)$/ou and @words = (n2w3($1), $Dec_word, n2w5($2)) or $num =~ /^\Q$Dec_char\E(.+)$/ou and @words = ($Digit_words{'0'}, $Dec_word, n2w5($1))
158 1 0 0 $n1 == 0 and push @words, "sepuluh" or $n1 == 1 and push @words, "sebelas"
0 0 0 $n1 == 0 and push @words, "sepuluh" or $n1 == 1 and push @words, "sebelas" or push @words, $Digit_words{$n1}, "belas"
169 9 2 14 $n3 != 0 or $n2 != 0
11 6 8 $n3 != 0 or $n2 != 0 or $n1 != 0
203 19 1 75 not length $w or $w eq "se"
20 7 68 not length $w or $w eq "se" or not @a