[position] Clean up rook unit tests
Use test_position! instead of position! Spell out the PlacedPiece constructor in the test_position! macro.
This commit is contained in:
parent
ea74b214da
commit
dab787170c
2 changed files with 14 additions and 7 deletions
|
@ -22,7 +22,15 @@ macro_rules! test_position {
|
|||
[$($color:ident $shape:ident on $square:ident),* $(,)?] => {
|
||||
{
|
||||
let pos = $crate::PositionBuilder::new()
|
||||
$(.place_piece(piece!($color $shape on $square)))*
|
||||
$(.place_piece(
|
||||
chessfriend_core::PlacedPiece::new(
|
||||
chessfriend_core::Piece::new(
|
||||
chessfriend_core::Color::$color,
|
||||
chessfriend_core::Shape::$shape
|
||||
),
|
||||
chessfriend_core::Square::$square
|
||||
))
|
||||
)*
|
||||
.build();
|
||||
println!("{pos}");
|
||||
pos
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue