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)?$/o and @words = n2w3($1)
154 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](.+)$/ and @words = (n2w2($1), $Exp_word, n2w2($2))
102 13 0 0 $num =~ /^(.+)\Q$Dec_char\E(.+)$/o and @words = (n2w3($1), $Dec_word, n2w5($2))
13 0 0 $num =~ /^\Q$Dec_char\E(.+)$/o and @words = ($Digit_words{'0'}, $Dec_word, n2w5($1))
151 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
154 22 0 3 $n3 == 1 and @words = "seratus"
159 0 0 1 $n1 == 0 and push @words, "sepuluh"
0 0 0 $n1 == 1 and push @words, "sebelas"
168 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 "")
118 13 0 shift() // (return "")
126 24 1 $t || 0
141 25 0 shift() // (return "")
151 1 3 $n1 == 1 and $order == 1 and @words = "se" or @words = $Digit_words{$n1}
177 5 1 shift() // (return "")

or 3 conditions

line l !l&&r !l&&!r condition
102 0 0 13 $num =~ /^(.+)\Q$Dec_char\E(.+)$/o and @words = (n2w3($1), $Dec_word, n2w5($2)) or $num =~ /^\Q$Dec_char\E(.+)$/o and @words = ($Digit_words{'0'}, $Dec_word, n2w5($1))
159 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"
170 9 2 14 $n3 != 0 or $n2 != 0
11 6 8 $n3 != 0 or $n2 != 0 or $n1 != 0
204 19 1 75 not length $w or $w eq "se"
20 7 68 not length $w or $w eq "se" or not @a