You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
532 B
28 lines
532 B
2 years ago
|
#[allow(unused_imports)]
|
||
|
use stackline::prelude::*;
|
||
|
use stackline::signal;
|
||
|
mod common;
|
||
|
|
||
|
#[test]
|
||
|
fn test_if() {
|
||
|
let mut world = load_test!("tests/logic/if.json");
|
||
|
world.init();
|
||
|
|
||
|
world.set_signal((0, 0), signal!([0]));
|
||
|
|
||
|
run!(world, 8);
|
||
|
|
||
|
assert_stored!(world, 1, 2);
|
||
|
assert_no_stored!(world, 2, 2);
|
||
|
|
||
|
let mut world = load_test!("tests/logic/if.json");
|
||
|
world.init();
|
||
|
|
||
|
world.set_signal((0, 0), signal!([1]));
|
||
|
|
||
|
run!(world, 8);
|
||
|
|
||
|
assert_no_stored!(world, 1, 2);
|
||
|
assert_stored!(world, 2, 2);
|
||
|
}
|