From 7d72a7077513339052c158891b8b485718e01b2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ostrzo=C5=82ek?= Date: Sun, 7 Jan 2024 16:30:47 +0100 Subject: [PATCH] fix TestPromotionCheckMate --- be/test/moves_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/be/test/moves_test.go b/be/test/moves_test.go index 2f22037..e857991 100644 --- a/be/test/moves_test.go +++ b/be/test/moves_test.go @@ -369,7 +369,7 @@ func TestPromotionCheckMate(t *testing.T) { moves := game.ValidMoves() performed := false for _, moveGroup := range moves { - if moveGroup.Piece.Type().Name() == "pawn" { + if moveGroup.To == boardtest.NewSquare("A8") { move := messtest.MoveWithOptionTexts([]string{"knight"}, moveGroup) err := move.Perform() assert.NoError(t, err) @@ -383,5 +383,6 @@ func TestPromotionCheckMate(t *testing.T) { resolution := game.Resolution() assert.True(t, resolution.DidEnd) + t.Log(game.String()) assert.Equal(t, resolution.Winner, game.Player(color.White)) }