Branch Coverage

blib/lib/PDLA/PP/PDLACode.pm
Criterion Covered Total %
branch 57 232 24.5


line true false branch
32 0 3 unless defined $name
36 0 3 unless $bvalflag
45 2 1 unless defined $dont_add_thrloop
46 3 0 unless defined $nogeneric_loop
56 0 3 if ($main::PP_VERBOSE)
58 0 0 if $dont_add_thrloop
89 0 2 if (not $threadloops || $dont_add_thrloop and $havethreading)
90 0 0 if $main::PP_VERBOSE
92 0 0 if (not $backcode) { }
107 0 2 if ($handlebad)
108 0 0 if $main::PP_VERBOSE
112 0 0 if (not $bad_threadloops || $dont_add_thrloop and $havethreading)
113 0 0 if $main::PP_VERBOSE
115 0 0 if (not $backcode) { }
132 0 0 if (defined $str)
133 0 0 unless $str eq $bad_str
141 0 2 if $main::PP_VERBOSE
144 2 0 unless ($nogeneric_loop)
167 0 2 if $main::PP_VERBOSE
180 0 0 unless (chop($ind) =~ /[0-9]/)
224 10 12 if $nth and not $it
226 12 16 ref $_ ? :
274 0 1 if $main::PP_VERBOSE
278 0 1 if $main::PP_VERBOSE
326 0 2 if ($this->[1] ne '')
328 0 0 if $#test != -1
334 0 2 if ($parent->{'types'})
353 2 4 unless ($item)
357 0 4 if ($this->[1] ne '')
364 0 4 if ($parent->{'types'})
389 0 2 if ($this->[1] ne '')
458 0 2 if $backcode
516 0 0 unless defined $backcode
539 0 0 unless $ts =~ /[$types]+/
562 0 2 unless $str =~ /^\$([a-zA-Z_]\w*)\s*\(([^)]*)\)/
565 0 2 if ($pdl =~ /^T/) { }
0 2 elsif ($pdl =~ /^P$/) { }
0 2 elsif ($pdl =~ /^PP$/) { }
0 2 elsif ($pdl =~ /^SIZE$/) { }
0 2 elsif ($pdl =~ /^RESIZE$/) { }
0 2 elsif ($pdl =~ /^GENERIC$/) { }
0 2 elsif ($pdl =~ /^PDLA$/) { }
2 0 elsif (not defined $parent->{'ParObjs'}{$pdl}) { }
582 0 0 if defined $parent->{'ParObjs'}{$this->[0]}
642 0 0 unless exists $use_nan{$type}
650 0 0 unless defined $type
656 0 0 unless exists $parent->{'ParObjs'}{$name}
664 0 0 if (exists $parent->{'pars'}{$name}) { }
0 0 elsif (exists $pobj->{'FlagTyped'} and $pobj->{'FlagTyped'}) { }
666 0 0 if $main::PP_VERBOSE
672 0 0 if ($pobj->{'FlagTplus'})
674 0 0 if ($gtype eq 'PDLA_Double') { }
0 0 elsif ($gtype eq 'PDLA_Float') { }
675 0 0 if $type ne 'double'
677 0 0 unless $type =~ /^(float|double)$/
682 0 0 if (&use_nan($type))
683 0 0 if ($opcode eq 'SETBAD') { }
733 0 0 unless exists $check->{$pdl_name} and defined $check->{$pdl_name}
747 0 0 if $main::PP_VERBOSE
750 0 0 unless defined $op
754 0 0 unless defined $obj
763 0 0 if $main::PP_VERBOSE
795 0 0 unless exists $check->{$pdl_name} and defined $check->{$pdl_name}
809 0 0 if $main::PP_VERBOSE
812 0 0 unless defined $op
816 0 0 unless defined $obj
825 0 0 if $main::PP_VERBOSE
869 0 0 if $main::PP_VERBOSE
872 0 0 unless defined $op
876 0 0 unless defined $obj
885 0 0 if $main::PP_VERBOSE
916 0 0 unless exists $check->{$pdl_name} and defined $check->{$pdl_name}
933 0 0 if $main::PP_VERBOSE
937 0 0 unless defined $opcode
941 0 0 unless defined $obj
947 0 0 if ($op eq 'IS') { }
0 0 elsif ($op eq 'SET') { }
953 0 0 if $main::PP_VERBOSE
970 0 0 unless defined $parent->{'ParObjs'}{$this->[0]}
989 0 0 if defined $parent->{'ParObjs'}{$this->[0]}
1004 0 0 unless defined $parent->{'ParObjs'}{$this->[0]}
1019 0 0 unless $pdl =~ /^\s*T([A-Z]+)\s*$/
1023 0 0 unless grep {$gt eq $_;} @ilst
1027 0 0 unless grep {$mtype eq $_;} @$gentypes
1034 0 0 unless $pdl =~ /^\s*T([A-Z]+)\s*$/
1038 0 0 if ($#lst != $#ilst)
1040 0 0 unless defined $parent->{'Gencurtype'}[-1]
1043 0 0 unless defined $type
1046 0 0 if $ilst[$_] =~ /$type/
1063 0 0 unless defined $parent->{'IndObjs'}{$this->[0]}
1078 0 0 unless $this->[0] =~ /^([^,]+),([^,]+)$/
1081 0 0 unless defined $parent->{'IndObjs'}{$1}
1095 0 0 if $pdls->{$_}->has_dim($1)
1116 0 0 unless defined $parent->{'Gencurtype'}[-1]
1118 0 0 if ($this->[0])
1120 0 0 unless defined $parent->{'ParObjs'}{$this->[0]}
1152 0 0 if $this->{'Types'} =~ /F/
1168 4 12 grep({/$foo->[0]/;} @$types) ? :
1177 0 0 $this->{'Types'} =~ /$_->[0]/ ? :
1221 0 8 unless s/^(.*?) # First, some noise is allowed. This may be bad. ( \$(ISBAD|ISGOOD|SETBAD)\s*\(\s*\$?[a-zA-Z_]\w*\s*\([^)]*\)\s*\) # $ISBAD($a(..)), ditto for ISGOOD and SETBAD |\$PP(ISBAD|ISGOOD|SETBAD)\s*\(\s*[a-zA-Z_]\w*\s*,\s*[^)]*\s*\) # $PPISBAD(CHILD,[1]) etc ### |\$STATE(IS|SET)(BAD|GOOD)\s*\(\s*[^)]*\s*\) # $STATEISBAD(a) etc |\$PDLASTATE(IS|SET)(BAD|GOOD)\s*\(\s*[^)]*\s*\) # $PDLASTATEISBAD(a) etc |\$[a-zA-Z_]\w*\s*\([^)]*\) # $a(...): access |\bloop\s*\([^)]+\)\s*%\{ # loop(..) %{ |\btypes\s*\([^)]+\)\s*%\{ # types(..) %{ |\bthreadloop\s*%\{ # threadloop %{ |%} # %} |$)//sx
1238 0 8 if ($control =~ /^\$STATE/)
1241 6 2 if ($control) { }
1242 1 5 if ($control =~ /^loop\s*\(([^)]+)\)\s*%\{/) { }
0 5 elsif ($control =~ /^types\s*\(([^)]+)\)\s*%\{/) { }
1 4 elsif ($control =~ /^threadloop\s*%\{/) { }
0 4 elsif ($control =~ /^\$PP(ISBAD|ISGOOD|SETBAD)\s*\(\s*([a-zA-Z_]\w*)\s*,\s*([^)]*)\s*\)/) { }
0 4 elsif ($control =~ /^\$(ISBAD|ISGOOD|SETBAD)VAR\s*\(\s*([^)]*)\s*,\s*([^)]*)\s*\)/) { }
0 4 elsif ($control =~ /^\$(ISBAD|ISGOOD|SETBAD)\s*\(\s*\$?([a-zA-Z_]\w*)\s*\(([^)]*)\)\s*\)/) { }
0 4 elsif ($control =~ /^\$PDLASTATE(IS|SET)(BAD|GOOD)\s*\(\s*([^)]*)\s*\)/) { }
2 2 elsif ($control =~ /^\$[a-zA-Z_]\w*\s*\([^)]*\)/) { }
2 0 elsif ($control =~ /^%}/) { }
1245 0 1 if $main::PP_VERBOSE
1275 0 2 if $main::PP_VERBOSE
1292 1 2 if $code_string =~ /(.*\bloop\s*%\{)/s
1305 1 0 unless $code =~ /$line_re/
1312 0 0 if (/$line_re/)