| blib/lib/Game/DijkstraMap.pm | |||
|---|---|---|---|
| Criterion | Covered | Total | % |
| condition | 74 | 107 | 69.1 |
| line | !l | l&&!r | l&&r | condition |
|---|---|---|---|---|
| 46 | 11 | 0 | 1 | exists $param->{'map'} and exists $param->{'str2map'} |
| 58 | 3 | 1 | 6 | $x >= 0 and $x <= $maxcol |
| 62 | 9 | 3 | 18 | $x >= 0 and $x <= $maxrow |
| 12 | 3 | 15 | $x >= 0 and $x <= $maxrow and $y >= 0 | |
| 6 | 1 | 14 | $x >= 0 and $x <= $maxrow and $y >= 0 and $y <= $maxcol | |
| 75 | 15 | 9 | 26 | $r > 0 and $c > 0 |
| 76 | 15 | 10 | 25 | $r > 0 and $c < $maxcol |
| 77 | 13 | 12 | 25 | $r < $maxrow and $c > 0 |
| 78 | 13 | 9 | 28 | $r < $maxrow and $c < $maxcol |
| 187 | 4 | 0 | 20 | $x >= 0 and $x <= $maxcol |
| 191 | 12 | 0 | 60 | $x >= 0 and $x <= $maxrow |
| 12 | 4 | 56 | $x >= 0 and $x <= $maxrow and $y >= 0 | |
| 4 | 0 | 56 | $x >= 0 and $x <= $maxrow and $y >= 0 and $y <= $maxcol | |
| 406 | 3 | 23 | 13 | $dimap->[$r][$c] != $mincost and $dimap->[$r][$c] != $badcost |
| line | l | !l | condition |
|---|---|---|---|
| 123 | 9 | 0 | $param->{'my_weight'} // 1 |
| 130 | 16 | 0 | $param->{'weights'}[$h] // 0 |
| 252 | 1 | 0 | $param->{'my_weight'} // 1 |
| 259 | 2 | 0 | $param->{'weights'}[$h] // 0 |
| 271 | 4 | 0 | $param->{'weights'}[$k] // 0 |
| 273 | 2 | 0 | $param->{'my_weight'} // 1 |
| 287 | 1 | 7 | $adjvals //= \&Game::DijkstraMap::adjacent_values_sq |
| line | l | !l&&r | !l&&!r | condition |
|---|---|---|---|---|
| 140 | 1 | 0 | 1 | not defined $fn or ref $fn ne 'CODE' |
| 155 | 0 | 1 | 7 | not defined $map or ref $map ne 'ARRAY' |
| 1 | 0 | 7 | not defined $map or ref $map ne 'ARRAY' or not defined $map->[0] | |
| 1 | 0 | 7 | not defined $map or ref $map ne 'ARRAY' or not defined $map->[0] or ref $map->[0] ne 'ARRAY' | |
| 179 | 0 | 0 | 13 | $r > $maxrow or $r < 0 |
| 180 | 0 | 0 | 13 | $c > $maxcol or $c < 0 |
| 182 | 1 | 11 | 1 | $value //= $dimap->[$r][$c] |
| 220 | 0 | 0 | 6 | $r > $maxrow or $r < 0 |
| 221 | 0 | 0 | 6 | $c > $maxcol or $c < 0 |
| 223 | 0 | 5 | 1 | $value //= $dimap->[$r][$c] |
| 298 | 197 | 29 | 222 | $value == $badcost or $value == $mincost |
| 347 | 4 | 5 | 47 | $value == $badcost or $value == $mincost |
| 419 | 0 | 6 | 0 | $lf //= $/ |
| 469 | 0 | 0 | 1 | $r > $maxrow or $r < 0 |
| 470 | 0 | 0 | 1 | $c > $maxcol or $c < 0 |
| 487 | 0 | 0 | 29 | $r > $maxrow or $r < 0 |
| 488 | 0 | 0 | 29 | $c > $maxcol or $c < 0 |