Branch Coverage

blib/lib/Google/ProtocolBuffers/Codec.pm
Criterion Covered Total %
branch 88 118 74.5


line true false branch
27 14 0 if ($ivsize >= 8) { }
0 0 elsif ($ivsize == 4) { }
41 14 0 if ($bo =~ /^1234/) { }
0 0 elsif ($bo =~ /4321$/) { }
134 1 217 ref $self ? :
147 12406 260 unless (defined $value)
148 11 12395 if ($cardinality == 2) { }
149 11 0 if (defined $default) { }
159 47 224 if (ref $value and ref $value eq 'ARRAY')
160 0 47 if ($cardinality != 3)
176 235 36 if ($encoder) { }
180 0 235 unless exists $wire_types[$type]
181 197 38 if (not $is_repeated) { }
197 17 19 if ($kind == 1) { }
12 7 elsif ($kind == 3) { }
7 0 elsif ($kind == 2) { }
198 11 6 if (not $is_repeated) { }
215 11 1 if (not $is_repeated) { }
228 5 2 if (not $is_repeated) { }
270 0 243 if (&Encode::is_utf8($_[0]))
303 10 420 if ($wire_type == 4)
304 10 0 if ($class->_pb_complex_type_kind == 2) { }
311 398 22 if (my $field = $fields->{$field_number}) { }
313 0 398 unless $field_number_ == $field_number
320 345 53 if ($decoder) { }
321 1 344 if ($wire_type == 2 and $type != 9 and $type != 12) { }
334 1 0 if ($cardinality == 3) { }
347 28 25 if ($kind == 1) { }
14 11 elsif ($kind == 3) { }
11 0 elsif ($kind == 2) { }
355 0 10 unless $field_number == $end_field_number
360 90 278 if ($cardinality == 3) { }
371 0 242 if ($class->_pb_complex_type_kind == 2) { }
392 14 10 if ($wire_type == 0) { }
3 7 elsif ($wire_type == 1) { }
3 4 elsif ($wire_type == 2) { }
1 3 elsif ($wire_type == 3) { }
0 3 elsif ($wire_type == 4) { }
3 0 elsif ($wire_type == 5) { }
401 0 1 unless $closing_field_number == $field_number
419 1 2 if $wire_type == 4
431 0 16 if $_[1] >= $l
432 14 2 if (ord substr($_[0], $_[1]++, 1) & 128) == 0
433 0 2 if ++$c >= 9
468 0 485 if $v < 0
473 0 377 if ++$c >= 10
499 8 26 if ($v & 1) { }
511 5 4 if ($_[1]) { }
519 6 5 decode_varint(@_) ? :
542 1 18 if $_[1] + 8 > length $_[0]
553 0 0 if $_[1] + 8 > length $_[0]
563 0 38 unless defined $_[1]
564 0 38 if (&Encode::is_utf8($_[1])) { }
578 2 45 if $_[1] + $length > length $_[0]
591 1 14 if $_[1] + 4 > length $_[0]
604 1 15 if $_[1] + 4 > length $_[0]
607 3 12 $v > 2147483647 ? :
617 1 27 if $_[1] + 4 > length $_[0]
627 0 0 if $_[1] + 4 > length $_[0]