Branch Coverage

blib/lib/VIC/PIC/Functions/GPIO.pm
Criterion Covered Total %
branch 112 160 70.0


line true false branch
14 33 4 if exists $self->output_pins->{$ipin}
18 0 4 unless (ref $allpins eq 'ARRAY')
24 0 4 unless exists $self->output_pins->{$iopin}
34 84 37 if exists $self->input_pins->{$ipin}
38 0 37 unless (ref $allpins eq 'ARRAY')
44 0 37 unless exists $self->input_pins->{$iopin}
55 0 37 unless $self->doesroles('Chip', 'GPIO')
56 0 37 unless defined $outp
57 26 11 if $io =~ /output/i
58 11 26 if $io =~ /input/i
59 34 3 if $ad =~ /digital/i
60 3 34 if $ad =~ /analog/i
61 0 37 unless $io == {sign => '+', value => [0]} || $io == {sign => '+', value => [1]} and $ad == {sign => '+', value => [0]} || $ad == {sign => '+', value => [1]}
68 13 24 if (exists $self->io_ports->{$outp} and exists $self->registers->{$outp}) { }
24 0 elsif (exists $self->pins->{$outp}) { }
71 13 0 $ad == {sign => '+', value => [0]} ? :
72 13 0 $ad == {sign => '+', value => [0]} ? :
73 13 0 if (exists $self->registers->{'ANSEL'})
76 12 1 if ($io == {sign => '+', value => [0]}) { }
78 93 111 if $self->output_pins->{$_}[{sign => '+', value => [0]}] eq $outp
82 4 14 if $self->input_pins->{$_}[{sign => '+', value => [0]}] eq $outp
87 0 97 unless defined $pin_no
89 0 97 unless ref $allpins eq 'ARRAY'
91 252 72 unless exists $self->analog_pins->{$anpin}
93 48 24 if $pbit < {sign => '+', value => [8]}
94 24 48 if $pbit >= {sign => '+', value => [8]}
97 13 0 $ad == {sign => '+', value => [0]} ? :
98 13 0 if ($flags != {sign => '+', value => [0]})
104 13 0 if (exists $self->registers->{'ANSELH'})
105 13 0 if ($flagsH != {sign => '+', value => [0]})
113 12 1 if ($io == {sign => '+', value => [0]}) { }
121 14 10 $io == {sign => '+', value => [0]} ? :
123 0 24 unless (defined $iopin)
124 0 0 $io == {sign => '+', value => [0]} ? :
130 14 10 $io == {sign => '+', value => [0]} ? :
132 24 0 if (exists $self->registers->{'ANSEL'})
135 0 24 unless (ref $allpins eq 'ARRAY')
140 32 20 unless exists $self->analog_pins->{$anpin}
143 20 0 if (exists $self->registers->{'ANSELH'})
144 0 20 $pbit >= {sign => '+', value => [8]} ? :
147 17 3 $ad == {sign => '+', value => [0]} ? :
152 14 10 if ($io == {sign => '+', value => [0]}) { }
188 3 0 if ($outp =~ /US?ART/)
189 3 0 if ($self->doesrole('USART') and exists $self->usart_pins->{$outp})
200 0 46 unless $self->doesroles('CodeGen', 'Operations', 'Chip', 'GPIO')
201 0 46 unless defined $outp
202 20 26 if (exists $self->io_ports->{$outp} and exists $self->registers->{$outp}) { }
19 7 elsif (exists $self->pins->{$outp}) { }
0 7 elsif (exists $self->registers->{$outp}) { }
205 0 20 unless (defined $val)
211 0 20 if ($self->validate($val))
214 0 0 if ($self->pins->{$val})
224 0 19 unless (defined $iopin)
229 10 9 if ($val =~ /^\d+$/) { }
4 5 elsif (exists $self->pins->{$val}) { }
4 1 elsif ($self->is_variable($val)) { }
230 3 7 if "$val" eq '0'
231 7 0 if "$val" eq '1'
238 4 0 if ($vpin) { }
271 7 0 if ($self->doesrole('USART') and exists $self->usart_pins->{$outp})
294 1 5 if (scalar @_ == {sign => '+', value => [1]}) { }
299 0 6 unless $self->doesroles('CodeGen', 'Chip', 'GPIO')
302 1 5 if (defined $var) { }
303 0 1 if (&looks_like_number($var) or ref $var eq 'HASH')
310 5 0 if (defined $action{'PARAM'}) { }
318 0 5 unless defined $action{'ACTION'} or defined $action{'ISR'}
319 0 5 unless defined $action{'END'}
323 1 5 if (exists $self->io_ports->{$inp} and exists $self->registers->{$inp}) { }
4 1 elsif (exists $self->pins->{$inp}) { }
337 0 4 if (not defined $ipin) { }
354 1 0 if ($self->doesrole('USART') and exists $self->usart_pins->{$inp})
360 4 1 if (%action)
361 1 3 if (exists $action{'ACTION'}) { }
3 0 elsif (exists $action{'ISR'}) { }
371 2 1 if (defined $portbit)
377 2 1 if (exists $self->ioc_pins->{$inp}) { }
1 0 elsif (exists $self->ioc_ports->{$inp}) { }
392 1 0 defined $ioc_reg ? :
2 1 defined $ioc_bit ? :
401 5 0 wantarray ? :