chessfriend/position/src/testing.rs
Eryn Wells 651544fdd9 [explorer, moves, position] Remove unused MoveBuilder
This thing isn't used by any of the "modern" code I've written. It was difficult
to write, but kinda neat architecturally. It made a lot of invalid configurations
of moves into build-time errors. Anyway…

Remove several of the tests that relied on it, but that hadn't been updated to
use the newer code either.
2025-06-08 17:16:23 -07:00

30 lines
650 B
Rust

// Eryn Wells <eryn@erynwells.me>
use chessfriend_moves::MakeMoveError;
#[macro_export]
macro_rules! assert_eq_bitboards {
($result:expr, $expected:expr) => {{
let result = $result;
let expected = $expected;
assert_eq!(
result, expected,
"Result:\n{}\nExpected:\n{}",
result, expected
);
}};
}
pub type TestResult = Result<(), TestError>;
#[derive(Debug, Eq, PartialEq)]
pub enum TestError {
MakeMove(MakeMoveError),
NoLegalMoves,
}
impl From<MakeMoveError> for TestError {
fn from(value: MakeMoveError) -> Self {
TestError::MakeMove(value)
}
}