Branch Coverage

blib/lib/Chess/PGN/EPD.pm
Criterion Covered Total %
branch 1 424 0.2


line true false branch
319 0 0 if $code
325 0 0 if (my $epd = shift()) { }
339 0 0 if $piece ne '_'
346 0 0 if ($_ eq 'K') { }
0 0 elsif ($_ eq 'Q') { }
0 0 elsif ($_ eq 'k') { }
0 0 elsif ($_ eq 'q') { }
382 0 0 if ($parameters{'board'})
407 0 0 if exists $parameters{'border'}
408 0 0 if exists $parameters{'corner'}
409 0 0 if exists $parameters{'legend'}
412 0 0 if ($type eq 'diagram') { }
0 0 elsif ($type eq 'text') { }
0 0 elsif ($type eq 'palview') { }
0 0 elsif ($type eq 'latex') { }
0 0 elsif ($type eq 'tilburg') { }
416 0 0 (pos($array[$_]) % 2 xor $_ % 2) ? :
425 0 0 (pos($array[$_]) % 2 xor $_ % 2) ? :
436 0 0 (pos($array[$_]) % 2 xor $_ % 2) ? :
454 0 0 (pos($array[$_]) % 2 xor $_ % 2) ? :
487 0 0 $single ? :
490 0 0 if ($corner eq 'rounded')
491 0 0 $single ? :
510 0 0 if ($legend eq 'yes')
511 0 0 $single ? :
513 0 0 $single ? :
536 0 0 $onwhite ? :
540 0 0 if (my $epd = shift())
552 0 0 if ($_)
556 0 0 /O/ ? :
558 0 0 if $to eq 'h1'
559 0 0 if $to eq 'a1'
560 0 0 if $to eq 'h8'
561 0 0 if $to eq 'a8'
563 0 0 if ($piece eq 'P') { }
0 0 elsif ($piece eq 'KR') { }
564 0 0 unless $w
565 0 0 if $promotion and not $w
566 0 0 if ($from) { }
568 0 0 if ($w) { }
578 0 0 if ($w) { }
580 0 0 unless ($board{$from})
587 0 0 unless ($board{$from})
594 0 0 if (substr($from, 0, 1) ne substr($to, 0, 1))
595 0 0 unless ($board{$to})
597 0 0 if ($w) { }
606 0 0 defined $enpassant ? :
607 0 0 defined $from ? :
608 0 0 defined $to ? :
611 0 0 $promotion ? :
613 0 0 defined $piece ? :
614 0 0 defined $from ? :
615 0 0 defined $to ? :
616 0 0 defined $promotion ? :
624 0 0 if ($w) { }
635 0 0 unless $w
637 0 0 if ($from)
640 0 0 defined $from ? :
641 0 0 if ($from =~ /[a-h]/) { }
643 0 0 if substr($_, 0, 1) eq $from
650 0 0 if substr($_, 1, 1) eq $from
659 0 0 if $_ eq $to
662 0 0 if (scalar @fromlist != 1) { }
664 0 0 if (canmove($piece, $to, $_, %board) and isLegal($w, $_, $to, %board))
675 0 0 if ($piece =~ /[RrKk]/)
676 0 0 if ($piece eq 'R') { }
0 0 elsif ($piece eq 'r') { }
0 0 elsif ($piece eq 'K') { }
677 0 0 if $from eq 'h1'
678 0 0 if $from eq 'a1'
681 0 0 if $from eq 'h8'
682 0 0 if $from eq 'a8'
692 0 0 defined $piece ? :
693 0 0 defined $from ? :
694 0 0 defined $to ? :
696 0 0 defined $piece ? :
0 0 defined $from ? :
0 0 defined $to ? :
0 0 defined $promotion ? :
0 0 defined $enpassant ? :
0 0 defined $castles ? :
718 0 0 if (scalar @moves and $moves[-1] eq '1')
721 0 0 if (%board) { }
730 0 0 if $debug
731 0 0 if ($_)
736 0 0 if $to eq 'h1'
737 0 0 if $to eq 'a1'
738 0 0 if $to eq 'h8'
739 0 0 if $to eq 'a8'
741 0 0 if ($debug)
744 0 0 if ($piece)
746 0 0 if $to
747 0 0 if $from
748 0 0 if $promotion
753 0 0 if ($piece eq 'P') { }
0 0 elsif ($piece eq 'KR') { }
754 0 0 unless $w
755 0 0 if $promotion and not $w
756 0 0 if ($from) { }
758 0 0 if ($w) { }
769 0 0 if ($w) { }
771 0 0 unless ($board{$from})
778 0 0 unless ($board{$from})
785 0 0 if (substr($from, 0, 1) ne substr($to, 0, 1))
786 0 0 unless ($board{$to})
788 0 0 if ($w) { }
797 0 0 if ($debug)
798 0 0 if $enpassant
799 0 0 if $from
800 0 0 if $to
805 0 0 $promotion ? :
807 0 0 if ($debug)
808 0 0 if $piece
809 0 0 if $from
810 0 0 if $to
811 0 0 if $promotion
814 0 0 if ($debug)
824 0 0 if ($w) { }
830 0 0 if ($debug)
831 0 0 $w ? :
835 0 0 if ($debug)
843 0 0 unless $w
845 0 0 if ($debug)
846 0 0 if @piece_at
849 0 0 if ($from)
852 0 0 if ($debug)
853 0 0 if $from
855 0 0 if ($from =~ /[a-h]/) { }
857 0 0 if substr($_, 0, 1) eq $from
864 0 0 if substr($_, 1, 1) eq $from
873 0 0 if $_ eq $to
876 0 0 if $debug
877 0 0 if (scalar @fromlist != 1) { }
878 0 0 if ($debug)
879 0 0 if @fromlist
883 0 0 if (canmove($piece, $to, $_, %board) and isLegal($w, $_, $to, %board))
894 0 0 if ($piece =~ /[RrKk]/)
895 0 0 if ($piece eq 'R') { }
0 0 elsif ($piece eq 'r') { }
0 0 elsif ($piece eq 'K') { }
896 0 0 if $from eq 'h1'
897 0 0 if $from eq 'a1'
900 0 0 if $from eq 'h8'
901 0 0 if $from eq 'a8'
911 0 0 if ($debug)
912 0 0 if @piece_at
914 0 0 if $piece
915 0 0 if $from
916 0 0 if $to
919 0 0 if ($debug)
922 0 0 unless ($from)
947 0 0 $w ? :
949 0 0 if ($board_copy{$_} and $board_copy{$_} eq $findking)
954 0 0 $w ? :
956 0 0 if ($board_copy{$square} and $mask =~ /$board_copy{$square}/)
958 0 0 if $_ eq $kings_square
963 0 0 if (canmove($board_copy{$_}, $kings_square, $_, %board_copy))
975 0 0 unless $piece
994 0 0 if ($board{$_}) { }
0 0 elsif ($whitesquare) { }
1017 0 0 if ($move =~ /^O-O(?:\+|\#)?$/) { }
0 0 elsif ($move =~ /^O-O-O(?:\+|\#)?$/) { }
0 0 elsif ($move =~ /^([2-7])([a-h][1-8])(?:\+|\#)?$/) { }
0 0 elsif ($move =~ /^([a-h][1-8])(?:\+|\#)?$/) { }
0 0 elsif ($move =~ /^([a-h])x?([a-h][1-8])(?:\+|\#)?$/) { }
0 0 elsif ($move =~ /^([a-h][18])=?([RNBQ])(?:\+|\#)?$/) { }
0 0 elsif ($move =~ /^([a-h])x([a-h][18])=?([RNBQ])(?:\+|\#)?$/) { }
0 0 elsif ($move =~ /^([RNBQK])([a-h][1-8])(?:\+|\#)?$/) { }
0 0 elsif ($move =~ /^([RNBQK])x([a-h][1-8])(?:\+|\#)?$/) { }
0 0 elsif ($move =~ /^([RNBQK])([a-h]|[1-8])([a-h][1-8])(?:\+|\#)?$/) { }
0 0 elsif ($move =~ /^([RNBQK])([a-h][1-8])([a-h][1-8])(?:\+|\#)?$/) { }
0 0 elsif ($move =~ /^([RNBQK])([a-h]|[1-8])x([a-h][1-8])(?:\+|\#)?$/) { }
0 0 elsif ($move =~ /^([RNBQK])([a-h][1-8])x([a-h][1-8])(?:\+|\#)?$/) { }
1018 0 0 if ($w) { }
1030 0 0 if ($w) { }
1079 0 0 if $_ and $board{$_}
1099 0 0 if ($_ and $_ % 8 == 0)
1100 0 0 if ($n)
1108 0 0 if ($piece) { }
1109 0 0 if ($n)
1120 0 0 if $n
1121 0 0 $w ? :
1123 0 0 if ($Kc or $Qc or $kc or $qc) { }
1125 0 0 if $Kc
1126 0 0 if $Qc
1127 0 0 if $kc
1128 0 0 if $qc
1154 0 0 if ($board{$from} and $board{'to'}) { }
0 0 elsif ($rto eq $rfrom or $lto eq $lfrom) { }
0 0 elsif ($piece =~ /[bq]/i) { }
1155 0 0 if (defined $board{$from} and defined $board{$to})
1156 0 0 if ($board{$from}->color == $board{$to}->color)
1163 0 0 if ($rto eq $rfrom and $lto lt $lfrom or $lto eq $lfrom and $rto lt $rfrom)
1169 0 0 if ($lto eq $lfrom)
1175 0 0 if (defined $board{$from})
1176 0 0 if $from ne $to
1183 0 0 if ($rto lt $rfrom)
1186 0 0 if ($lto lt $lfrom)
1194 0 0 if (defined $board{$from})
1195 0 0 if $from ne $to
1210 0 0 if ($options{'all'}) { }
1217 0 0 if ($_ eq 'eco') { }
0 0 elsif ($_ eq 'nic') { }
0 0 elsif ($_ eq 'Opening') { }
1228 0 0 if ($options{'astags'}) { }
1229 0 0 if $eco
1230 0 0 if $nic
1231 0 0 if $opening
1234 0 0 if $eco
1235 0 0 if $nic
1236 0 0 if $opening
1250 0 110 if (m[(\\|/)Perl[\\/]site[\\/]lib$]i)