Branch Coverage

blib/lib/VIC/PIC/Functions/USART.pm
Criterion Covered Total %
branch 60 110 54.5


line true false branch
13 0 3 unless $self->doesroles('USART', 'GPIO', 'CodeGen', 'Chip')
14 0 3 unless $outp =~ /UART|USART/
15 3 0 $outp =~ /^UART/ ? :
20 0 3 unless defined $ipin and defined $opin
22 0 3 unless exists $self->pins->{$ipin} and exists $self->pins->{$opin}
25 3 0 if (exists $self->registers->{'SPBRGH'} and exists $self->registers->{'SPBRG'} and exists $self->registers->{'BAUDCTL'}) { }
0 0 elsif (exists $self->registers->{'SPBRG'}) { }
36 0 3 $sync ? :
39 0 3 unless defined $baudr
44 0 3 unless (ref $baudref eq 'HASH')
51 0 3 if ($baudref->{'BRG16'}) { }
56 3 0 if ($baudref->{'BRGH'}) { }
78 3 0 if (exists $self->registers->{'ANSEL'})
83 0 3 unless (ref $iallpins eq 'ARRAY')
87 0 3 unless (ref $oallpins eq 'ARRAY')
93 3 9 if exists $self->analog_pins->{$_}
96 0 9 if exists $self->analog_pins->{$_}
102 3 0 if (exists $self->registers->{'ANSELH'})
103 3 0 $pbit >= 8 ? :
105 3 0 if ($ansel ne $pansel)
112 0 3 unless (exists $self->registers->{'TXSTA'} and exists $self->registers->{'RCSTA'})
117 0 3 if ($sync)
146 3 0 wantarray ? :
283 0 7 unless $self->doesroles('USART', 'GPIO', 'CodeGen', 'Chip')
284 0 7 unless $outp =~ /US?ART/
285 0 7 unless defined $data
292 5 2 if (ref $data eq 'HASH') { }
293 1 4 if (exists $data->{'type'}) { }
295 0 1 unless ($data->{'type'} eq 'string')
318 1 1 if (&looks_like_number($data)) { }
333 5 2 if (@bytearr) { }
1 1 elsif (defined $szvar) { }
345 0 5 if (scalar @bytearr > 256)
348 5 0 scalar @bytearr < 256 ? :
369 7 0 wantarray ? :
377 0 1 if (scalar @_ == 1) { }
1 0 elsif (scalar @_ > 1) { }
385 0 1 unless $self->doesroles('USART', 'GPIO', 'CodeGen', 'Chip')
386 0 1 unless $inp =~ /US?ART/
388 1 0 unless (defined $var)
389 1 0 if (defined $action{'PARAM'}) { }
397 0 1 unless defined $action{'ACTION'} or defined $action{'ISR'}
398 0 1 unless defined $action{'END'}
405 1 0 if (%action)
406 0 1 if (exists $action{'ACTION'}) { }
1 0 elsif (exists $action{'ISR'}) { }
416 0 1 unless ($self->doesrole('ISR'))
421 0 1 unless $rx_int
431 1 0 wantarray ? :
438 0 1 unless defined $href and ref $href eq 'HASH'
439 0 1 unless (exists $self->registers->{'INTCON'})
452 1 0 if ($preg eq 'INTCON') { }
470 0 1 unless defined $href and ref $href eq 'HASH'
471 0 1 unless defined $isr{'ISR'} and $isr{'END'}
478 1 0 if (defined $isr{'PARAM'})