[gnome-chess/gnome-3-8] Update insufficient material testcases



commit 5377a5050ae1cab2e2edc150ce423617cf0d2c21
Author: Michael Catanzaro <mike catanzaro gmail com>
Date:   Tue May 28 20:29:44 2013 -0500

    Update insufficient material testcases

 src/test-chess-game.vala |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/test-chess-game.vala b/src/test-chess-game.vala
index c1c209e..bd56a87 100644
--- a/src/test-chess-game.vala
+++ b/src/test-chess-game.vala
@@ -148,12 +148,18 @@ class GlChess
         test_good_move("k7/7p/7K/8/8/8/8/6Nb w - - 0 1", "Kxh7",
                        "k7/7K/8/8/8/8/8/6Nb b - - 0 1");
 
-        /* Insufficient material - King and n same-color bishops vs. King and n other-color bishops */
+        /* Insufficient material - King and n same-color bishops vs. King and n same-color bishops */
+        test_good_move("k2b1b1b/6bp/7K/4B1B1/8/8/8/8 w - - 0 1", "Kxh7",
+                       "k2b1b1b/6bK/8/4B1B1/8/8/8/8 b - - 0 1", ChessResult.DRAW, 
ChessRule.INSUFFICIENT_MATERIAL);
+        /* Sufficient if the players' bishops are on opposite colors */
         test_good_move("k2b1b1b/6bp/7K/5B1B/8/8/8/8 w - - 0 1", "Kxh7",
-                       "k2b1b1b/6bK/8/5B1B/8/8/8/8 b - - 0 1", ChessResult.DRAW, 
ChessRule.INSUFFICIENT_MATERIAL);
-        /* Sufficient if a bishop is on each color */
+                       "k2b1b1b/6bK/8/5B1B/8/8/8/8 b - - 0 1", ChessResult.IN_PROGRESS);
+        /* Still sufficient with only one bishop per player, opposite colors */
+        test_good_move("k6b/6bp/7K/7B/8/8/8/8 w - - 0 1", "Kxh7",
+                       "k6b/6bK/8/7B/8/8/8/8 b - - 0 1", ChessResult.IN_PROGRESS);
+        /* Sufficient if one player has a bishop on each color */
         test_good_move("k2b1b1b/6bp/7K/6BB/8/8/8/8 w - - 0 1", "Kxh7",
-                       "k2b1b1b/6bK/8/6BB/8/8/8/8 b - - 0 1");
+                       "k2b1b1b/6bK/8/6BB/8/8/8/8 b - - 0 1", ChessResult.IN_PROGRESS);
 
         // FIXME: Need to be able to test claim draw
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]