From 2a5082d57f2ede3b87eb47983f19b9173876917f Mon Sep 17 00:00:00 2001 From: Janis Date: Tue, 31 Mar 2026 19:40:30 +0200 Subject: [PATCH] test: add coverage for all completePromotion branches (Moved, Checkmate, Stalemate) --- .../de/nowchess/chess/engine/GameEnginePromotionTest.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/src/test/scala/de/nowchess/chess/engine/GameEnginePromotionTest.scala b/modules/core/src/test/scala/de/nowchess/chess/engine/GameEnginePromotionTest.scala index 292e618..92c32ff 100644 --- a/modules/core/src/test/scala/de/nowchess/chess/engine/GameEnginePromotionTest.scala +++ b/modules/core/src/test/scala/de/nowchess/chess/engine/GameEnginePromotionTest.scala @@ -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 // 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 engine = new GameEngine(initialBoard = board) + val engine = new GameEngine(initialBoard = board, initialTurn = Color.Black) val events = captureEvents(engine) engine.processUserInput("e2e1")