[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:
parent
0201668563
commit
eb192e6dc4
1 changed files with 5 additions and 5 deletions
|
@ -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)
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue