Branch Coverage

blib/lib/Lingua/RU/Inflect.pm
Criterion Covered Total %
branch 86 106 81.1


line true false branch
197 4 40 if $patronym =~ /\x{43d}\x{430}$/
198 8 32 if $patronym =~ /[\x{438}\x{44b}]\x{447}$/
205 8 3012 if $firstname eq $_
209 5 2295 if $firstname eq $_
213 6 108 if $firstname eq $_
217 13 6 unless ($ambiguous)
219 5 8 if $firstname =~ /[\x{430}\x{44f}]$/
221 8 0 unless $firstname =~ /[\x{430}\x{435}\x{451}\x{438}\x{43e}\x{443}\x{44b}\x{44d}\x{44e}\x{44f}]$/
226 2 4 if $lastname =~ /(\x{435}\x{432}|\x{438}\x{43d}|\x{44b}\x{43d}|\x{451}\x{432}|\x{43e}\x{432})\x{430}$/
227 2 2 if $lastname =~ /(\x{435}\x{432}|\x{438}\x{43d}|\x{44b}\x{43d}|\x{451}\x{432}|\x{43e}\x{432})$/
229 0 2 if $lastname =~ /(\x{430}\x{44f}|\x{44f}\x{44f})$/
230 0 2 if $lastname =~ /(\x{438}\x{439}|\x{44b}\x{439})$/
251 0 23 if $case eq -1
253 0 23 if $case < 0 or $case > 4
261 16 7 unless $patronym
263 2 5 if $patronym =~ s/\x{43d}\x{430}$/('ны', 'не', 'ну', 'ной', 'не')[$case];/e
264 1 4 if $patronym =~ s/\x{44b}\x{447}$/('ыча', 'ычу', 'ыча', 'ычем', 'ыче')[$case];/e
271 2 21 unless $firstname
281 1 20 if $firstname =~ /[\x{435}\x{451}\x{438}\x{43e}\x{443}\x{44b}\x{44d}\x{44e}]$/i
282 0 20 if $firstname =~ /[\x{430}\x{435}\x{451}\x{438}\x{43e}\x{443}\x{44b}\x{44d}\x{44e}\x{44f}]\x{430}$/i
283 0 20 if $firstname =~ /[\x{430}\x{451}\x{43e}\x{443}\x{44b}\x{44d}\x{44e}\x{44f}]\x{44f}$/i
286 1 19 if !defined($gender) || $gender == 0 and $firstname =~ /[\x{431}\x{432}\x{433}\x{434}\x{436}\x{437}\x{43a}\x{43b}\x{43c}\x{43d}\x{439}\x{43f}\x{440}\x{441}\x{442}\x{444}\x{445}\x{446}\x{447}\x{448}\x{449}]$/i
291 0 19 if $firstname =~ s/\x{438}\x{44f}$/('ии', 'ии', 'ию', 'ией', 'ие')[$case];/e
292 2 17 if $firstname =~ s/([\x{433}\x{436}\x{439}\x{43a}\x{445}\x{447}\x{448}\x{449}])\x{430}$/$1 . ('и', 'е', 'у', 'ой', 'е')[$case];/e
293 6 11 if $firstname =~ s/\x{430}$/('ы', 'е', 'у', 'ой', 'е')[$case];/e
294 1 10 if $firstname =~ s/\x{43c}\x{44f}$/('мени', 'мени', 'мя', 'менем', 'мени')[$case];/e
295 3 7 if $firstname =~ s/\x{44f}$/('и', 'е', 'ю', 'ей', 'е')[$case];/e
296 1 6 if $firstname =~ s/\x{439}$/('я', 'ю', 'я', 'ем', 'е')[$case];/e
299 5 1 if ($gender == 1) { }
1 0 elsif ($gender == 0) { }
300 0 5 if $firstname =~ s/\x{44c}$/('я', 'ю', 'я', 'ем', 'е')[$case];/e
303 1 0 if $firstname =~ s/\x{44c}$/('и', 'и', 'ь', 'ью', 'и')[$case];/e
312 2 21 unless $lastname
313 1 20 unless defined $gender
319 1 19 if $lastname =~ /[\x{435}\x{451}\x{438}\x{43e}\x{443}\x{44b}\x{44d}\x{44e}]$/i
320 0 19 if $lastname =~ /[\x{430}\x{435}\x{451}\x{438}\x{43e}\x{443}\x{44b}\x{44d}\x{44e}\x{44f}]\x{430}$/i
323 0 19 if $lastname =~ /[\x{451}\x{43e}\x{443}\x{44b}\x{44d}\x{44e}]\x{44f}$/i
324 1 18 if $lastname =~ /[\x{438}\x{44b}]\x{445}$/i
328 5 13 if $lastname =~ /(\x{438}\x{43d}|\x{44b}\x{43d}|\x{435}\x{432}|\x{451}\x{432}|\x{43e}\x{432})\x{430}$/ and $lastname =~ s/\x{430}$/('ой', 'ой', 'у', 'ой', 'ой')[$case];/e
335 4 9 if $lastname =~ /(\x{438}\x{43d}|\x{44b}\x{43d}|\x{435}\x{432}|\x{451}\x{432}|\x{43e}\x{432})$/ and $lastname .= ('а', 'у', 'а', 'ым', 'е')[$case]
339 0 9 if $lastname =~ s/\x{430}\x{44f}$/('ой', 'ой', 'ую', 'ой', 'ой')[$case];/e
340 0 9 if $lastname =~ s/\x{44f}\x{44f}$/('ей', 'ей', 'юю', 'ей', 'ей')[$case];/e
341 1 8 if $lastname =~ s/\x{43a}\x{438}\x{439}$/('кого', 'кому', 'кого', 'ким', 'ком')[$case];/e
342 0 8 if $lastname =~ s/\x{438}\x{439}$/('его', 'ему', 'его', 'им', 'ем')[$case];/e
343 0 8 if $lastname =~ s/\x{44b}\x{439}$/('ого', 'ому', 'ого', 'ым', 'ом')[$case];/e
344 1 7 if $lastname =~ s/\x{43e}\x{439}$/('ого', 'ому', 'ого', 'ым', 'ом')[$case];/e
347 5 2 if ($gender == 1)
348 1 4 if $lastname =~ s/\x{430}$/('ы', 'е', 'у', 'ой', 'е')[$case];/e
349 1 3 if $lastname =~ s/\x{43c}\x{44f}$/('мени', 'мени', 'мя', 'менем', 'мени')[$case];/e
350 0 3 if $lastname =~ s/\x{44f}$/('и', 'е', 'ю', 'ёй', 'е')[$case];/e
351 0 3 if $lastname =~ s/\x{439}$/('я', 'ю', 'й', 'ем', 'е')[$case];/e
352 0 3 if $lastname =~ s/\x{44c}$/('я', 'ю', 'я', 'ем', 'е')[$case];/e
378 1 23 if $case eq -1