Skip to content

Commit

Permalink
fix TestPromotionCheckMate
Browse files Browse the repository at this point in the history
  • Loading branch information
jostrzol committed Jan 7, 2024
1 parent 6936319 commit 7d72a70
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion be/test/moves_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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))
}

0 comments on commit 7d72a70

Please sign in to comment.