test: add coverage for all completePromotion branches (Moved, Checkmate, Stalemate)

This commit is contained in:
2026-03-31 19:40:30 +02:00
parent fc5e18ad3b
commit 2a5082d57f
@@ -137,7 +137,7 @@ class GameEnginePromotionTest extends AnyFunSuite with Matchers:
// Black pawn e2, white king h3 (not on rank 1 or file e), black king a8 // Black pawn e2, white king h3 (not on rank 1 or file e), black king a8
// e2->e1=Q: queen on e1 does not attack h3 -> normal Moved // e2->e1=Q: queen on e1 does not attack h3 -> normal Moved
val board = FenParser.parseBoard("k7/8/8/8/8/7K/4p3/8").get val board = FenParser.parseBoard("k7/8/8/8/8/7K/4p3/8").get
val engine = new GameEngine(initialBoard = board) val engine = new GameEngine(initialBoard = board, initialTurn = Color.Black)
val events = captureEvents(engine) val events = captureEvents(engine)
engine.processUserInput("e2e1") engine.processUserInput("e2e1")