Branch Coverage

blib/lib/RPi/ADC/ADS.pm
Criterion Covered Total %
branch 33 44 75.0


line true false branch
132 42 149 if (defined $opt)
133 5 37 unless (exists $param_map->{$sub}{$opt})
142 149 37 unless defined $self->{$sub}
179 8 34 if (defined $addr)
180 3 5 unless (grep {$addr eq $_;} '72', '73', '74', '75')
187 29 10 unless defined $self->{'addr'}
194 16 40 if (defined $dev)
195 5 11 unless ($dev =~ m[/dev/i2c-\d])
202 29 22 unless defined $self->{'device'}
209 24 30 if (defined $model)
210 7 17 unless ($model =~ /^ADS1[01]1[3458]/)
217 29 18 unless defined $self->{'model'}
242 216 267 if (defined $msb)
243 0 216 unless (defined $lsb)
246 0 216 unless (grep {$msb == $_;} 0..255)
249 0 216 unless (grep {$lsb == $_;} 0..255)
299 47 9 if (defined $model)
300 9 38 if ($model =~ /11\d{2}/) { }
315 0 0 if (defined $channel)
330 0 0 if (defined $channel)
343 0 0 if (defined $channel)
355 0 0 if $percent > 100