Implement some helpful testing types and traits in the moves package

This commit is contained in:
Eryn Wells 2024-02-25 09:15:07 -08:00
parent d714374f35
commit 9b7bf3a212
4 changed files with 30 additions and 11 deletions

View file

@ -1,10 +1,10 @@
// Eryn Wells <eryn@erynwells.me>
use chessfriend_core::{piece, Square};
use chessfriend_moves::{Builder, BuilderError};
use chessfriend_moves::{testing::*, Builder};
#[test]
fn pawn_push() -> Result<(), BuilderError> {
fn pawn_push() -> TestResult {
let mv = Builder::push(&piece!(White Pawn on A3))
.to(Square::A4)
.build()?;