Branch Coverage

blib/lib/VIC/PIC/Gpsim.pm
Criterion Covered Total %
branch 115 210 54.7


line true false branch
30 11 1 if $mod =~ /^(?:every|wave)$/i
36 0 19 unless $self->pic->doesroles('Chip', 'CodeGen', 'GPIO')
38 19 0 if $self->pic
39 19 0 if $self->pic
40 19 0 if ($freq) { }
57 4 26 if (defined $color and ref $color eq 'HASH')
60 26 4 unless defined $color
61 0 30 unless $color =~ /red|orange|green|yellow|blue/i
63 0 30 if $color =~ /^@/
78 101 0 if ($gpio_pin) { }
83 0 0 if ($gpio_pin)
94 32 0 if ($self->pic)
95 1 31 if (exists $self->pic->registers->{$port}) { }
31 0 elsif (exists $self->pic->pins->{$port}) { }
100 31 0 if (defined $io1) { }
117 94 0 if ($self->pic)
118 25 69 if (exists $self->pic->registers->{$port}) { }
69 0 elsif (exists $self->pic->pins->{$port}) { }
121 24 1 if defined $pin
124 69 0 if (defined $io1 and defined $io3) { }
142 27 0 if ($self->pic)
143 0 27 if (exists $self->pic->registers->{$port}) { }
1 26 elsif (exists $self->pic->pins->{$port}) { }
148 1 0 if (defined $io1) { }
159 1 0 wantarray ? :
164 14 3 unless $count
165 0 17 if int $count < {sign => '+', value => [1]}
167 14 3 if ($count == {sign => '+', value => [1]}) { }
171 0 14 $c >= {sign => '+', value => [4]} ? :
178 3 0 if ($self->pic)
181 4 12 $_ >= {sign => '+', value => [4]} ? :
199 0 2 if (defined $p and ref $p eq 'HASH')
201 0 0 unless defined $p
203 1 1 if (exists $self->pic->pins->{$p}) { }
1 0 elsif (exists $self->pic->registers->{$p}) { }
0 0 elsif ($p =~ /red|orange|green|yellow|blue/i) { }
208 0 17 unless defined $self->pic->output_pins->{$_}[{sign => '+', value => [0]}]
209 8 9 if $self->pic->output_pins->{$_}[{sign => '+', value => [0]}] eq $p
213 0 0 if $p =~ /^@/
219 0 1 unless scalar @simpins
253 0 7 unless defined $file
254 7 0 if (ref $file eq 'HASH')
257 0 7 if $file =~ /^@/
258 7 0 if $file =~ /\.lxt/i
266 3 26 if ($port =~ /US?ART/) { }
267 0 3 unless $self->pic->doesrole('USART')
270 3 0 if (defined $ipin and defined $opin)
274 0 3 if $ireg ne $oreg
278 0 26 unless $reg
292 0 33 if $chnl > {sign => '+', value => [7]}
293 0 33 if $chnl > {sign => '+', value => [7]}
294 1 32 if (lc $simport eq lc $port) { }
298 8 0 if ($self->scope_channels < {sign => '+', value => [8]})
303 0 8 if $chnl > {sign => '+', value => [7]}
304 0 8 if $chnl > {sign => '+', value => [7]}
319 3 27 if ($port =~ /US?ART/) { }
320 0 3 unless $self->pic->doesrole('USART')
323 3 0 if defined $opin
324 3 0 if defined $opin
336 27 0 if $op eq 'EQ'
337 0 0 if $op eq 'NE'
338 0 0 if $op eq 'GT'
339 0 0 if $op eq 'GE'
340 0 0 if $op eq 'LT'
341 0 0 if $op eq 'LE'
348 27 2 if ($condition =~ /\@@/) { }
351 27 0 if (scalar @args == {sign => '+', value => [3]})
356 27 0 if (not $lhs =~ /$literal/) { }
358 1 26 if (defined $pin) { }
0 26 elsif (defined $port) { }
370 0 27 if (not $rhs =~ /$literal/) { }
372 0 0 if (defined $pin) { }
0 0 elsif (defined $port) { }
387 26 1 if (defined $msg and ref $msg eq 'HASH')
390 1 26 unless $msg
391 0 27 if $msg =~ /^@/
392 0 27 if $condition =~ /^@/
395 0 2 if (defined $msg and ref $msg eq 'HASH')
398 2 0 if (defined $condition and ref $condition eq 'HASH')
401 0 2 if (defined $condition and defined $msg) { }
2 0 elsif (defined $condition and not defined $msg) { }
0 0 elsif (defined $msg and not defined $condition) { }
402 0 0 if $msg =~ /^@/
403 0 0 if $condition =~ /^@/
406 0 2 if $condition =~ /^@/
409 0 0 if $msg =~ /^@/
431 2 7 if defined $hh{'EVERY'} and length $hh{'EVERY'}
432 2 7 if defined $period and length $period
435 9 0 if (exists $hh{'WAVE'} and ref $hh{'WAVE'} eq 'ARRAY')
437 9 0 if scalar @$arr
440 5 61 unless /^\d+$/
442 1 8 if $ad
481 1 0 if defined $rollover
482 1 0 if defined $rollover
488 0 3 unless @_
491 3 0 if ($pin =~ /US?ART/)
494 0 3 unless ($self->pic->doesrole('USART'))
498 3 0 if @_
499 2 1 if @_
500 3 0 $pin =~ /^UART/ ? :
502 0 3 unless defined $baudrate
503 0 3 unless defined $baudrate
510 0 3 unless exists $self->pic->pins->{$ipin} and exists $self->pic->pins->{$opin}
522 2 1 if (defined $loopback)
523 2 0 if (ref $loopback eq 'HASH' and $loopback->{'string'} =~ /loopback/i)