Branch Coverage

blib/lib/Data/Bitfield.pm
Criterion Covered Total %
branch 37 50 74.0


line true false branch
126 13 5 ref $_[0] eq 'HASH' ? :
131 0 18 unless $VALID_FORMATS{$format}
143 1 38 unless (defined $name)
147 0 1 unless ($used_bits & $mask) =~ /^\0*$/
162 1 37 if $fields{$name}
163 1 36 unless ($used_bits & $mask) =~ /^\0*$/
166 3 33 if ($format eq 'bytes-BE')
167 2 1 if $width <= 8
168 3 0 if $width <= 16
169 3 0 if $width <= 24
179 2 14 $format eq 'bytes-BE' ? :
185 1 0 unless defined(my $f = $fields{$_}) or $unrecognised_ok and next
192 17 12 if $encoder
193 1 28 unless defined $v
197 1 27 unless int $v eq $v
202 1 26 unless $v >= 0 and ($bits & ~$mask) =~ /^\0+$/
222 14 12 if $decoder
228 4 12 if ($format eq 'integer')
234 4 0 if ($nbits <= 8) { }
0 0 elsif ($nbits <= 16) { }
0 0 elsif ($nbits <= 24) { }
0 0 elsif ($nbits <= 32) { }
320 1 1 if $v < 0
325 1 1 if $v & $sign
383 0 1 unless $value >= 0 and $value < 1 << $width