Condition Coverage

blib/lib/Lingua/IND/Num2Word.pm
Criterion Covered Total %
condition 50 84 59.5


and 2 conditions

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

and 3 conditions

line !l l&&!r l&&r condition
81 13 0 0 $num =~ /^(.+)[Ee](.+)$/u and @words = (n2w2($1), $Exp_word, n2w2($2))
105 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))
153 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
156 22 0 3 $n3 == 1 and @words = "seratus"
161 0 0 1 $n1 == 0 and push @words, "sepuluh"
0 0 0 $n1 == 1 and push @words, "sebelas"
170 16 6 3 $n3 > 0 and $n2 == 0
22 3 0 $n3 > 0 and $n2 == 0 and $n1 > 0
219 0 0 0 defined $number && $number =~ /\A\d+\z/msux

or 2 conditions

line l !l condition
75 14 1 shift() // (return "")
92 13 0 shift() // (return "")
120 13 0 shift() // (return "")
128 24 1 $t || 0
143 25 0 shift() // (return "")
153 1 3 $n1 == 1 and $order == 1 and @words = "se" or @words = $Digit_words{$n1}
179 5 1 shift() // (return "")

or 3 conditions

line l !l&&r !l&&!r condition
105 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))
161 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"
172 9 2 14 $n3 != 0 or $n2 != 0
11 6 8 $n3 != 0 or $n2 != 0 or $n1 != 0
206 19 1 75 not length $w or $w eq "se"
20 7 68 not length $w or $w eq "se" or not @a
219 0 0 0 not defined $number && $number =~ /\A\d+\z/msux or $number < 1
0 0 0 not defined $number && $number =~ /\A\d+\z/msux or $number < 1 or $number > '999999999999'