Branch Coverage

Device/SNP.pm
Criterion Covered Total %
branch 52 96 54.1


line true false branch
189 0 0 unless $port
219 11 0 if $count == 1 and $in eq "\e"
223 0 11 unless $count == $$self{'expectlength'} - 1
236 0 11 if $$self{'Debug'}
253 0 11 if ($bcc != $mybcc) { }
0 11 elsif ($som != $Device::SNP::StartOfMessage) { }
0 11 elsif ($eob != $Device::SNP::EndOfBlock) { }
0 11 elsif ($$self{'expecttype'} and $$self{'expecttype'} != $mtype) { }
275 1 10 if $nexttype
287 0 11 if $$self{'Debug'}
288 10 1 if ($mtype == $Device::SNP::MtypeXMessage) { }
1 0 elsif ($mtype == $Device::SNP::MtypeText) { }
305 0 1 if $$self{'Debug'}
306 1 0 if ($self->handle_write($$self{'expectSelector'}, $$self{'expectOffset'}, $$self{'expectLength'}, $data)) { }
335 0 10 if $$self{'Debug'}
336 1 9 if ($reqcode == $Device::SNP::XtypeAttach) { }
7 2 elsif ($reqcode == $Device::SNP::XtypeRead) { }
2 0 elsif ($reqcode == $Device::SNP::XtypeWrite) { }
356 0 1 if $$self{'Debug'}
357 0 0 unless $snpid eq $Device::SNP::BroadcastSNPID or $snpid eq $Device::SNP::NullSNPID or $snpid eq $$self{'SNPID'}
372 0 7 if $$self{'Debug'}
373 0 7 unless $snpid eq $Device::SNP::NullSNPID or $snpid eq $$self{'SNPID'}
385 0 7 if $$self{'Debug'}
389 5 2 if ($type eq 'word') { }
0 2 elsif ($type eq 'byte') { }
2 0 elsif ($type eq 'bit') { }
402 7 0 if (defined $data) { }
427 0 5 unless defined $segment
440 0 0 unless defined $segment
451 0 2 unless defined $segment
463 0 2 unless $snpid eq $Device::SNP::BroadcastSNPID or $snpid eq $Device::SNP::NullSNPID or $snpid eq $$self{'SNPID'}
468 0 2 if $$self{'Debug'}
470 1 1 if ($$self{'expecttype'} == $Device::SNP::MtypeText) { }
1 0 elsif ($self->handle_write($selector, $offset, $length, $data)) { }
511 0 2 if $$self{'Debug'}
514 1 1 if ($type eq 'word') { }
0 1 elsif ($type eq 'byte') { }
1 0 elsif ($type eq 'bit') { }
534 0 1 unless defined $segment
551 0 0 unless defined $segment
566 0 1 unless defined $segment
574 1 0 if ($data[$srcindex] & $mask) { }
593 0 1 if $$self{'Debug'}
632 0 11 if $$self{'Debug'}
634 0 11 unless $$self{'port'}
639 0 10 unless $count
640 0 10 unless $count == length $msg
654 232 201 if $bcc & 256