bitboard: split test

This commit is contained in:
Simon Gardling 2025-03-25 15:43:12 -04:00
parent 4848c0cd61
commit 59215f04c0
Signed by: titaniumtown
GPG Key ID: 9AB28AC10ECE533D

View File

@ -118,14 +118,19 @@ mod test {
use super::*;
#[test]
fn set_and_get() {
let mut b = BitBoard::new();
fn init_empty() {
let b = BitBoard::new();
for c in 0..Board::AREA.0 {
assert!(
!b.get(CoordPair(c)),
"A just-initalized BitBoard should be completely empty"
)
}
}
#[test]
fn set_and_get() {
let mut b = BitBoard::new();
assert!(!b.get((2, 4).into()));
b.set((2, 4).into(), true);