Branch Coverage

blib/lib/CEDict/Pinyin.pm
Criterion Covered Total %
branch 19 50 38.0


line true false branch
151 0 0 unless $self->isPinyin($parts)
153 0 0 unless @parts
158 0 0 $2 ? :
159 0 0 if ($tone < 4)
160 0 0 if ($part =~ /([ae])/) { }
0 0 elsif ($part =~ /ou/) { }
0 0 elsif ($part =~ /v/) { }
0 0 elsif (reverse $part =~ /([aeiou])/) { }
208 0 7 unless $source
210 1 6 unless $source =~ /^[a-z]+[a-z1-5,'\- ]*$/
220 9 4 if $validSubstring =~ /([1-5])/
226 13 2 unless ($validSubstring)
227 9 4 $tone ? :
236 2 11 unless defined $validSubstring
255 0 0 unless my $source = shift()
262 0 0 if ($_ eq '*')
269 0 0 unless @parts
272 0 0 unless _isValidInitialSubstring($parts[$#parts])
277 0 0 unless $parts[$i] =~ /[1-5]/
278 0 0 unless ($h == $#reParts || $h == $#reParts - 1 && $reParts[$#reParts] eq '*' and $i == $#parts)
298 0 0 if /^$startsWith/
313 14 1 length $syllable < 6 ? :
316 11 4 if exists $ValidPinyin{$syllable}
321 2 16 if exists $ValidPinyin{$part}
325 2 2 unless $valid