Branch Coverage

blib/lib/Lingua/EN/Nums2Words.pm
Criterion Covered Total %
branch 59 74 79.7


line true false branch
42 0 2 if (scalar grep(/^$case$/, @cases) != 1)
51 74 74 if ($word_case eq 'upper') { }
74 0 elsif ($word_case eq 'lower') { }
80 26 0 if (abs int $Number != 1)
81 0 26 if (not $Final =~ s/ AND / $dollar_verb AND /) { }
83 0 0 if (abs $Number != 1)
99 18 8 if ($Final =~ / AND /) { }
100 16 2 if ($Final =~ /[- ]([A-Z]+) AND/)
102 16 0 if (defined $CardinalToOrdinalMapping{$CardPartToConvToOrd}) { }
111 8 0 if ($Final =~ /([A-Z]+)$/)
113 8 0 if (defined $CardinalToOrdinalMapping{$CardPartToConvToOrd}) { }
129 0 8 if ($Number != int $Number)
136 8 0 if ($Number =~ /([0-9])?([0-9])$/) { }
138 8 0 if (defined $1)
146 4 4 if (defined $least_2_sig_dig and defined $CardinalToShortOrdinalMapping[$least_2_sig_dig]) { }
172 18 122 if (length $Number and $Number < 0)
182 62 78 if ($Number =~ /^([0-9]*)\./)
191 220 94 if (length $Number > 2) { }
207 2776 304 if (not defined $Breakdown{$Classification} or $Breakdown{$Classification} < 1)
214 178 126 if ($Index > 0)
219 178 126 if (length $Final > 0) { }
229 14 126 if (length $Final == 0)
235 18 122 if ($NegativeFlag)
241 62 78 if (length $DecimalVerbiage > 0)
255 220 84 if (length $Number > 2)
258 200 20 if (length $HundredVerbiage > 0)
264 200 104 if (defined $HundredVerbiage and length $HundredVerbiage > 0) { }
266 200 0 if (length $TenVerbiage)
278 284 240 if (length $Number < 2) { }
281 62 178 if ($Number < 20) { }
287 168 10 if (length $MD[$Ones] > 0) { }
310 78 62 if (not $DecNumber =~ /\./) { }
315 36 26 unless ($KeepTrailingZeros)
320 0 62 if (length $DecNumber and $DecNumber == 1)
336 0 26 if (defined $UserScrewUp and length $UserScrewUp)
338 2 24 unless (length $Int)
339 8 18 unless defined $Dec