From 5bf47eac7b97d3eb9dd610a56b35e315dcd81e9a Mon Sep 17 00:00:00 2001 From: Mario Lang Date: Sat, 26 Apr 2014 13:01:29 +0200 Subject: chess-perft.el: Another test case to improve coverage. make perft now takes 13m45s. --- chess-perft.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'chess-perft.el') diff --git a/chess-perft.el b/chess-perft.el index 673ce9e..7dbc858 100644 --- a/chess-perft.el +++ b/chess-perft.el @@ -123,7 +123,8 @@ If not called interactively the result is a list of the form (ert-deftest chess-perft-startpos-depth4 () :tags '(:capture :check :checkmate) - (should (equal (chess-perft (chess-pos-create) 4) '(197281 1576 0 0 0 469 8)))) + (should (equal (chess-perft (chess-pos-create) 4) + '(197281 1576 0 0 0 469 8)))) (ert-deftest chess-perft-startpos-depth5 () :tags '(:capture :en-passant :check :checkmate) @@ -150,6 +151,14 @@ If not called interactively the result is a list of the form "r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq -"))) (should (equal (chess-perft position 3) '(97862 17102 45 3162 0 993 1))))) +(ert-deftest chess-perft-kiwipete-depth4 () + :tags '(:capture :en-passant :castle :promote :check :checkmate) + (let ((position + (chess-fen-to-pos + "r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq -"))) + (should (equal (chess-perft position 4) + '(4085603 757163 1929 128013 15172 25523 43))))) + (ert-deftest chess-perft-pos3-depth1 () :tags '(:capture :check) (let ((position (chess-fen-to-pos "8/2p5/3p4/KP5r/1R3p1k/8/4P1P1/8 w - -"))) -- cgit v1.2.3