Branch Coverage

blib/lib/Chess/Rep/Coverage.pm
Criterion Covered Total %
branch 38 64 59.3


line true false branch
33 37 155 if ($p)
47 3 34 if ($p & 4) { }
9 25 elsif ($p & 1 and $self->to_move != $c) { }
56 6 18 if $x & 136
62 9 0 $c == 0 ? :
67 2 16 if $m->[0] < 0 or $m->[0] > 7 or $m->[1] < 0 or $m->[1] > 7
113 53 35 unless ($p)
119 20 33 $cover->{$piece}{'color'} ? :
136 25 0 if ($fen =~ /^(.+?)\s(.*)$/)
140 16 9 $color ? :
151 3 102 if ($i =~ /^\d$/) { }
156 25 77 if ($position == $col) { }
190 53 46 unless $p
192 43 3 if (Chess::Rep::piece_color($p) == $color) { }
194 40 3 unless $p == 4 or $p == 132
205 3 220 if @_
215 0 2 unless $self->_cover
231 19 109 if ($self->_cover->{$col . $row}) { }
232 5 14 if (exists $self->_cover->{$col . $row}{'is_protected_by'} and exists $self->_cover->{$col . $row}{'is_threatened_by'}) { }
14 0 elsif (exists $self->_cover->{$col . $row}{'white_can_move_here'} and exists $self->_cover->{$col . $row}{'black_can_move_here'}) { }
259 16 112 if $col eq 'H'
294 0 0 unless $moves and $moves >= 0
314 0 0 unless $influenced
326 0 0 if ($n + 1 == $move) { }
328 0 0 $state ? :
334 0 0 if ($size != 0)
335 0 0 $state ? :
362 0 0 defined $value ? :
364 0 0 if $value < 0
367 0 0 if $value > 0
370 0 0 if $value != 0
381 0 0 if $sum ne '1'