13 lines
485 B
Rust
13 lines
485 B
Rust
// 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));
|
|
});
|
|
}
|