bitboard: split test
This commit is contained in:
parent
4848c0cd61
commit
59215f04c0
@ -118,14 +118,19 @@ mod test {
|
|||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn set_and_get() {
|
fn init_empty() {
|
||||||
let mut b = BitBoard::new();
|
let b = BitBoard::new();
|
||||||
for c in 0..Board::AREA.0 {
|
for c in 0..Board::AREA.0 {
|
||||||
assert!(
|
assert!(
|
||||||
!b.get(CoordPair(c)),
|
!b.get(CoordPair(c)),
|
||||||
"A just-initalized BitBoard should be completely empty"
|
"A just-initalized BitBoard should be completely empty"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn set_and_get() {
|
||||||
|
let mut b = BitBoard::new();
|
||||||
|
|
||||||
assert!(!b.get((2, 4).into()));
|
assert!(!b.get((2, 4).into()));
|
||||||
b.set((2, 4).into(), true);
|
b.set((2, 4).into(), true);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user