Branch Coverage

blib/lib/PDL/PP/PDLCode.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 =~ /^PDL$/) { }
2 0 elsif (not defined $parent->{'ParObjs'}{$pdl}) { }
582 0 0 if defined $parent->{'ParObjs'}{$this->[0]}
644 0 0 unless exists $use_nan{$type}
652 0 0 unless defined $type
658 0 0 unless exists $parent->{'ParObjs'}{$name}
666 0 0 if (exists $parent->{'pars'}{$name}) { }
0 0 elsif (exists $pobj->{'FlagTyped'} and $pobj->{'FlagTyped'}) { }
668 0 0 if $main::PP_VERBOSE
674 0 0 if ($pobj->{'FlagTplus'})
676 0 0 if ($gtype eq 'PDL_Double') { }
0 0 elsif ($gtype eq 'PDL_Float') { }
677 0 0 if $type ne 'double'
679 0 0 unless $type =~ /^(float|double)$/
684 0 0 if (&use_nan($type))
685 0 0 if ($opcode eq 'SETBAD') { }
735 0 0 unless exists $check->{$pdl_name} and defined $check->{$pdl_name}
749 0 0 if $main::PP_VERBOSE
752 0 0 unless defined $op
756 0 0 unless defined $obj
765 0 0 if $main::PP_VERBOSE
797 0 0 unless exists $check->{$pdl_name} and defined $check->{$pdl_name}
811 0 0 if $main::PP_VERBOSE
814 0 0 unless defined $op
818 0 0 unless defined $obj
827 0 0 if $main::PP_VERBOSE
871 0 0 if $main::PP_VERBOSE
874 0 0 unless defined $op
878 0 0 unless defined $obj
887 0 0 if $main::PP_VERBOSE
918 0 0 unless exists $check->{$pdl_name} and defined $check->{$pdl_name}
935 0 0 if $main::PP_VERBOSE
939 0 0 unless defined $opcode
943 0 0 unless defined $obj
949 0 0 if ($op eq 'IS') { }
0 0 elsif ($op eq 'SET') { }
955 0 0 if $main::PP_VERBOSE
972 0 0 unless defined $parent->{'ParObjs'}{$this->[0]}
991 0 0 if defined $parent->{'ParObjs'}{$this->[0]}
1006 0 0 unless defined $parent->{'ParObjs'}{$this->[0]}
1021 0 0 unless $pdl =~ /^\s*T([A-Z]+)\s*$/
1025 0 0 unless grep {$gt eq $_;} @ilst
1029 0 0 unless grep {$mtype eq $_;} @$gentypes
1036 0 0 unless $pdl =~ /^\s*T([A-Z]+)\s*$/
1040 0 0 if ($#lst != $#ilst)
1042 0 0 unless defined $parent->{'Gencurtype'}[-1]
1045 0 0 unless defined $type
1048 0 0 if $ilst[$_] =~ /$type/
1065 0 0 unless defined $parent->{'IndObjs'}{$this->[0]}
1080 0 0 unless $this->[0] =~ /^([^,]+),([^,]+)$/
1083 0 0 unless defined $parent->{'IndObjs'}{$1}
1097 0 0 if $pdls->{$_}->has_dim($1)
1118 0 0 unless defined $parent->{'Gencurtype'}[-1]
1120 0 0 if ($this->[0])
1122 0 0 unless defined $parent->{'ParObjs'}{$this->[0]}
1154 0 0 if $this->{'Types'} =~ /F/
1170 4 16 grep({/$foo->[0]/;} @$types) ? :
1179 0 0 $this->{'Types'} =~ /$_->[0]/ ? :
1223 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 |\$PDLSTATE(IS|SET)(BAD|GOOD)\s*\(\s*[^)]*\s*\) # $PDLSTATEISBAD(a) etc |\$[a-zA-Z_]\w*\s*\([^)]*\) # $a(...): access |\bloop\s*\([^)]+\)\s*%\{ # loop(..) %{ |\btypes\s*\([^)]+\)\s*%\{ # types(..) %{ |\bthreadloop\s*%\{ # threadloop %{ |%} # %} |$)//sx
1240 0 8 if ($control =~ /^\$STATE/)
1243 6 2 if ($control) { }
1244 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 =~ /^\$PDLSTATE(IS|SET)(BAD|GOOD)\s*\(\s*([^)]*)\s*\)/) { }
2 2 elsif ($control =~ /^\$[a-zA-Z_]\w*\s*\([^)]*\)/) { }
2 0 elsif ($control =~ /^%}/) { }
1247 0 1 if $main::PP_VERBOSE
1277 0 2 if $main::PP_VERBOSE
1294 1 2 if $code_string =~ /(.*\bloop\s*%\{)/s
1307 1 0 unless $code =~ /$line_re/
1314 0 0 if (/$line_re/)