restructure to allow cargo tests

This commit is contained in:
Crispy 2025-03-15 21:00:20 +01:00
parent fa10b38f99
commit 7574ec20f5
10 changed files with 50 additions and 23 deletions

27
tests/main.rs Normal file
View file

@ -0,0 +1,27 @@
use marble_machinations::marble_engine::{board::Board, Machine};
#[test]
fn creating_marbles_cause_indirect_claim() {
let mut eng = Machine::new_empty();
eng.set_board(Board::parse(
"
I
o 2
B- o
B | |-*-|
|-+o | |
*-| |* -B B-
1 3
I I
",
));
for _ in 0..9 {
eng.step();
}
assert_eq!(eng.output(), [1, 2, 3]);
}