Branch Coverage

blib/lib/Game/DijkstraMap.pm
Criterion Covered Total %
branch 124 152 81.5


line true false branch
46 1 0 if exists $param->{'map'} and exists $param->{'str2map'}
48 0 11 if exists $param->{'map'}
50 5 6 if exists $param->{'str2map'}
58 6 4 if $x >= 0 and $x <= $maxcol
62 14 4 if $x >= 0 and $x <= $maxrow and $y >= 0 and $y <= $maxcol
75 26 24 if $r > 0 and $c > 0
76 25 25 if $r > 0 and $c < $maxcol
77 25 25 if $r < $maxrow and $c > 0
78 28 22 if $r < $maxrow and $c < $maxcol
86 196 74 if $c > 0
87 213 57 if $c < $maxcol
88 199 71 if $r > 0
89 210 60 if $r < $maxrow
97 1 0 if (defined $dimap)
113 1 1 unless defined $dimap
120 0 9 if ($value == $badcost)
127 1 16 if ($here[$h] == $badcost)
141 1 1 if not defined $fn or ref $fn ne "CODE"
143 0 1 unless defined $dimap
156 0 7 if not defined $map or ref $map ne "ARRAY" or not defined $map->[0] or ref $map->[0] ne "ARRAY"
163 0 21 if @{$map->[$r]} != $cols
180 3 13 unless defined $dimap
183 0 13 if $r > $maxrow or $r < 0
184 0 13 if $c > $maxcol or $c < 0
187 1 12 if $value <= $self->min_cost
191 20 4 if $x >= 0 and $x <= $maxcol
196 56 4 if $x >= 0 and $x <= $maxrow and $y >= 0 and $y <= $maxcol
204 61 15 if $_->[1] < $value
222 1 6 unless defined $dimap
225 0 6 if $r > $maxrow or $r < 0
226 0 6 if $c > $maxcol or $c < 0
229 1 5 if $value <= $self->min_cost
231 5 0 if ($c > 0)
234 5 0 if ($c < $maxcol)
237 5 0 if ($r > 0)
240 5 0 if ($r < $maxrow)
245 14 6 if $_->[1] < $value
251 0 1 unless defined $dimap
256 0 1 if $curcost <= $self->min_cost
263 0 2 if $here[$h] == $badcost
269 0 1 unless @$coords
276 1 4 if $costs[$k][$p] == $badcost
281 1 1 if $newcost < $curcost
284 0 1 unless @ret
305 226 222 if $value == $badcost or $value == $mincost
307 40 182 if ($value < 0)
313 221 416 if $nv == $badcost
315 231 185 if $nv < $best
316 40 376 if $best == $mincost
318 52 170 if ($value >= $best + 2)
320 18 34 if $isneg
326 8 18 if $stable
354 9 47 if $value == $badcost or $value == $mincost
356 0 47 if ($value < 0)
367 4 182 if $nr->[0] == $badcost
369 84 98 if $nr->[0] < $best->[0]
370 26 156 if $best->[0] == $mincost
372 17 30 if ($value > $best->[0] + "1.4142135623731")
374 0 17 if $isneg
380 2 3 if $stable
388 1 1 unless defined $dimap
410 1 2 unless defined $dimap
418 13 26 if $dimap->[$r][$c] != $mincost and $dimap->[$r][$c] != $badcost
430 0 6 unless defined $str
441 2 1 unless (defined $ref)
443 1 1 unless defined $ref
451 5 8 if $c == $cols - 1
461 1 2 unless defined $dimap
467 5 34 if $dimap->[$r][$c] == $maxcost
476 1 1 unless defined $dimap
481 0 1 if $r > $maxrow or $r < 0
482 0 1 if $c > $maxcol or $c < 0
483 0 1 unless &looks_like_number($ref->[2])
493 1 23 unless defined $dimap
499 0 29 if $r > $maxrow or $r < 0
500 0 29 if $c > $maxcol or $c < 0