Update king move generator tests
This commit is contained in:
parent
216140bdbc
commit
3b266cb94a
1 changed files with 3 additions and 3 deletions
|
@ -161,13 +161,13 @@ impl<'pos> Iterator for KingMoveGenerator<'pos> {
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use crate::{Position, Square};
|
||||
use crate::{piece::Piece, Position, Square};
|
||||
use std::collections::HashSet;
|
||||
|
||||
#[test]
|
||||
fn one_king() {
|
||||
let mut pos = Position::empty();
|
||||
pos.place_piece(&Piece::king(Color::White), &Square::e4())
|
||||
pos.place_piece(Piece::king(Color::White), Square::E4)
|
||||
.expect("Failed to place king on e4");
|
||||
|
||||
let generator = KingMoveGenerator::new(&pos, Color::White);
|
||||
|
@ -211,7 +211,7 @@ mod tests {
|
|||
#[test]
|
||||
fn one_king_corner() {
|
||||
let mut pos = Position::empty();
|
||||
pos.place_piece(&Piece::king(Color::White), &Square::a1())
|
||||
pos.place_piece(Piece::king(Color::White), Square::A1)
|
||||
.expect("Failed to place king on a1");
|
||||
|
||||
let generator = KingMoveGenerator::new(&pos, Color::White);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue