0.1.0-0-pre.4
This commit is contained in:
12
crates/engines/engine-v1-common/unit_tests/input.rs
Normal file
12
crates/engines/engine-v1-common/unit_tests/input.rs
Normal file
@@ -0,0 +1,12 @@
|
||||
// file: crates/engines/engine-v1-common/unit_tests/input.rs
|
||||
// version: 1
|
||||
|
||||
#[test]
|
||||
fn action_state_is_independent() {
|
||||
game_logging_lib::with_test_tracing("action_state_is_independent", || {
|
||||
let input = crate::InputState::none().with_action(crate::GameAction::Primary, true);
|
||||
assert!(input.is_active(crate::GameAction::Primary));
|
||||
assert!(!input.is_active(crate::GameAction::Secondary));
|
||||
assert!(!input.is_active(crate::GameAction::Left));
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user