Branch Coverage

blib/lib/Lingua/RU/Inflect.pm
Criterion Covered Total %
branch 101 120 84.1


line true false branch
201 5 98 if $patronym =~ /\x{43d}\x{430}$/
202 9 89 if $patronym =~ /[\x{438}\x{44b}]\x{447}$/
204 2 87 if $patronym =~ /\b\x{43a}\x{44b}\x{437}\x{44b}$/i
205 4 83 if $patronym =~ /\b(\x{43e}\x{433}\x{43b}\x{44b}|\x{443}\x{43b}\x{44b})$/i
207 1 82 if $patronym =~ /\x{434}\x{43e}\x{442}\x{442}\x{438}\x{440}$/
208 1 81 if $patronym =~ /\x{441}\x{43e}\x{43d}$/
215 12 69 if &any(sub { $firstname eq $_; } , &_FEMININE_NAMES)
216 19 50 if &any(sub { $firstname eq $_; } , &_MASCULINE_NAMES)
219 6 344 if $firstname eq $_
222 44 6 unless ($ambiguous)
224 7 37 if $firstname =~ /[\x{430}\x{44f}]$/
226 37 0 unless $firstname =~ /[\x{430}\x{435}\x{451}\x{438}\x{43e}\x{443}\x{44b}\x{44d}\x{44e}\x{44f}]$/
231 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}$/
232 2 2 if $lastname =~ /(\x{435}\x{432}|\x{438}\x{43d}|\x{44b}\x{43d}|\x{451}\x{432}|\x{43e}\x{432})$/
234 0 2 if $lastname =~ /(\x{430}\x{44f}|\x{44f}\x{44f})$/
235 0 2 if $lastname =~ /(\x{438}\x{439}|\x{44b}\x{439})$/
256 0 62 if $case eq -1
258 0 62 if $case < 0 or $case > 4
266 55 7 unless $patronym
268 2 5 if $patronym =~ s/\x{43d}\x{430}$/("\x{43d}\x{44b}", "\x{43d}\x{435}", "\x{43d}\x{443}", "\x{43d}\x{43e}\x{439}", "\x{43d}\x{435}")[$case];/e
269 1 4 if $patronym =~ s/\x{44b}\x{447}$/("\x{44b}\x{447}\x{430}", "\x{44b}\x{447}\x{443}", "\x{44b}\x{447}\x{430}", "\x{44b}\x{447}\x{435}\x{43c}", "\x{44b}\x{447}\x{435}")[$case];/e
276 2 60 unless $firstname
288 5 55 if $firstname =~ /[\x{435}\x{451}\x{438}\x{43e}\x{443}\x{44b}\x{44d}\x{44e}]$/i
289 0 55 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
290 0 55 if $firstname =~ /[\x{430}\x{451}\x{43e}\x{443}\x{44b}\x{44d}\x{44e}\x{44f}]\x{44f}$/i
293 1 54 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
298 0 54 if $firstname =~ s/\x{438}\x{44f}$/("\x{438}\x{438}", "\x{438}\x{438}", "\x{438}\x{44e}", "\x{438}\x{435}\x{439}", "\x{438}\x{435}")[$case];/e
299 2 52 if $firstname =~ s/([\x{433}\x{436}\x{439}\x{43a}\x{445}\x{447}\x{448}\x{449}])\x{430}$/$1 . ("\x{438}", "\x{435}", "\x{443}", "\x{43e}\x{439}", "\x{435}")[$case];/e
300 11 41 if $firstname =~ s/\x{430}$/("\x{44b}", "\x{435}", "\x{443}", "\x{43e}\x{439}", "\x{435}")[$case];/e
301 1 40 if $firstname =~ s/\x{43c}\x{44f}$/("\x{43c}\x{435}\x{43d}\x{438}", "\x{43c}\x{435}\x{43d}\x{438}", "\x{43c}\x{44f}", "\x{43c}\x{435}\x{43d}\x{435}\x{43c}", "\x{43c}\x{435}\x{43d}\x{438}")[$case];/e
302 4 36 if $firstname =~ s/\x{44f}$/("\x{438}", "\x{435}", "\x{44e}", "\x{435}\x{439}", "\x{435}")[$case];/e
303 3 33 if $firstname =~ s/\x{439}$/("\x{44f}", "\x{44e}", "\x{44f}", "\x{435}\x{43c}", "\x{435}")[$case];/e
306 32 1 if ($gender == 1) { }
1 0 elsif ($gender == 0) { }
307 1 31 if $firstname =~ s/\x{44c}$/("\x{44f}", "\x{44e}", "\x{44f}", "\x{435}\x{43c}", "\x{435}")[$case];/e
310 1 0 if $firstname =~ s/\x{44c}$/("\x{438}", "\x{438}", "\x{44c}", "\x{44c}\x{44e}", "\x{438}")[$case];/e
319 2 60 unless $lastname
320 1 59 unless defined $gender
323 1 58 if $lastname =~ /[\x{435}\x{451}\x{438}\x{43e}\x{443}\x{44b}\x{44d}\x{44e}]$/i
324 0 58 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
327 0 58 if $lastname =~ /[\x{451}\x{43e}\x{443}\x{44b}\x{44d}\x{44e}]\x{44f}$/i
331 2 56 if $lastname =~ /\x{44b}\x{445}$/i and not $lastname =~ /^(\x{411}\x{443}\x{43b}\x{442}|(|\x{41e}\x{442}|\x{41f}\x{435}\x{440}\x{435}|\x{420}\x{43e}\x{437})\x{434}|\x{416}\x{43c}|\x{41f})\x{44b}\x{445}$/i
335 5 51 if $lastname =~ /(\x{43a}\x{430}\x{440}|[\x{433}\x{436}\x{43a}\x{43d}\x{445}\x{448}\x{449}\x{44c}])\x{438}\x{445}$/i and not $lastname =~ /^(\x{41c}\x{438}\x{43d}|\x{41c}\x{44e}\x{43d}\x{43d})\x{438}\x{445}$/
342 5 46 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}$/("\x{43e}\x{439}", "\x{43e}\x{439}", "\x{443}", "\x{43e}\x{439}", "\x{43e}\x{439}")[$case];/e
349 4 42 if ($gender == 0) { }
351 0 4 if $lastname =~ s/\x{430}\x{44f}$/("\x{43e}\x{439}", "\x{43e}\x{439}", "\x{443}\x{44e}", "\x{43e}\x{439}", "\x{43e}\x{439}")[$case];/e
352 0 4 if $lastname =~ s/\x{44f}\x{44f}$/("\x{435}\x{439}", "\x{435}\x{439}", "\x{44e}\x{44e}", "\x{435}\x{439}", "\x{435}\x{439}")[$case];/e
365 4 38 if $lastname =~ /(\x{438}\x{43d}|\x{44b}\x{43d}|\x{435}\x{432}|\x{451}\x{432}|\x{43e}\x{432})$/ and $lastname .= ("\x{430}", "\x{443}", "\x{430}", "\x{44b}\x{43c}", "\x{435}")[$case]
369 1 37 if $lastname =~ s/\x{43a}\x{438}\x{439}$/("\x{43a}\x{43e}\x{433}\x{43e}", "\x{43a}\x{43e}\x{43c}\x{443}", "\x{43a}\x{43e}\x{433}\x{43e}", "\x{43a}\x{438}\x{43c}", "\x{43a}\x{43e}\x{43c}")[$case];/e
370 0 37 if $lastname =~ s/\x{438}\x{439}$/("\x{435}\x{433}\x{43e}", "\x{435}\x{43c}\x{443}", "\x{435}\x{433}\x{43e}", "\x{438}\x{43c}", "\x{435}\x{43c}")[$case];/e
371 0 37 if $lastname =~ s/\x{44b}\x{439}$/("\x{43e}\x{433}\x{43e}", "\x{43e}\x{43c}\x{443}", "\x{43e}\x{433}\x{43e}", "\x{44b}\x{43c}", "\x{43e}\x{43c}")[$case];/e
372 1 36 if $lastname =~ s/\x{43e}\x{439}$/("\x{43e}\x{433}\x{43e}", "\x{43e}\x{43c}\x{443}", "\x{43e}\x{433}\x{43e}", "\x{44b}\x{43c}", "\x{43e}\x{43c}")[$case];/e
375 2 34 if $lastname =~ s/([\x{433}\x{436}\x{439}\x{43a}\x{445}\x{447}\x{448}\x{449}])\x{430}$/$1 . ("\x{438}", "\x{435}", "\x{443}", "\x{43e}\x{439}", "\x{435}")[$case];/e
376 1 33 if $lastname =~ s/\x{430}$/("\x{44b}", "\x{435}", "\x{443}", "\x{43e}\x{439}", "\x{435}")[$case];/e
377 1 32 if $lastname =~ s/\x{43c}\x{44f}$/("\x{43c}\x{435}\x{43d}\x{438}", "\x{43c}\x{435}\x{43d}\x{438}", "\x{43c}\x{44f}", "\x{43c}\x{435}\x{43d}\x{435}\x{43c}", "\x{43c}\x{435}\x{43d}\x{438}")[$case];/e
379 1 31 if $lastname =~ /\x{430}\x{44f}$/
380 0 31 if $lastname =~ s/\x{44f}$/("\x{438}", "\x{435}", "\x{44e}", "\x{451}\x{439}", "\x{435}")[$case];/e
381 0 31 if $lastname =~ s/\x{439}$/("\x{44f}", "\x{44e}", "\x{439}", "\x{435}\x{43c}", "\x{435}")[$case];/e
382 0 31 if $lastname =~ s/\x{44c}$/("\x{44f}", "\x{44e}", "\x{44f}", "\x{435}\x{43c}", "\x{435}")[$case];/e
408 1 62 if $case eq -1