[position] Fix the peterellisjones::en_passant_discovered_check test

This test was asserting that an e.p. move is included in the list of generated
moves. Actually, the position does NOT allow an e.p. move for black.
This commit is contained in:
Eryn Wells 2024-02-11 09:56:24 -07:00
parent 0201668563
commit eb192e6dc4

View file

@ -214,12 +214,12 @@ fn en_passant_discovered_check() {
let generated_moves = pos.moves().iter().collect::<HashSet<_>>();
let unexpected_move = MoveBuilder::new(piece!(Black Pawn), Square::E4, Square::D3)
.capturing_en_passant(piece!(White Pawn on D4))
.build();
assert!(
generated_moves.contains(
&MoveBuilder::new(piece!(Black Pawn), Square::E4, Square::D3)
.capturing_en_passant(piece!(White Pawn on D4))
.build()
),
!generated_moves.contains(&unexpected_move),
"Valid moves: {:?}",
formatted_move_list!(generated_moves, pos)
);