restructure to allow cargo tests
This commit is contained in:
parent
fa10b38f99
commit
7574ec20f5
10 changed files with 50 additions and 23 deletions
27
tests/main.rs
Normal file
27
tests/main.rs
Normal 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]);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue