From 62a966edc11c60e8efaa42250c50b14449bcc457 Mon Sep 17 00:00:00 2001 From: Alice Cecile Date: Wed, 24 Jul 2024 14:41:54 -0400 Subject: [PATCH] Add workaround for https://github.com/bevyengine/bevy/issues/13915 to tests --- src/clashing_inputs.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/clashing_inputs.rs b/src/clashing_inputs.rs index e7848e1d..3696ed2b 100644 --- a/src/clashing_inputs.rs +++ b/src/clashing_inputs.rs @@ -468,7 +468,7 @@ mod tests { } mod basic_functionality { - use crate::prelude::ModifierKey; + use crate::prelude::{AccumulatedMouseMovement, AccumulatedMouseScroll, ModifierKey}; use bevy::input::InputPlugin; use Action::*; @@ -572,6 +572,8 @@ mod tests { fn resolve_prioritize_longest() { let mut app = App::new(); app.add_plugins(InputPlugin); + app.init_resource::(); + app.init_resource::(); let input_map = test_input_map(); let simple_clash = input_map.possible_clash(&One, &OneAndTwo).unwrap(); @@ -620,6 +622,8 @@ mod tests { fn handle_clashes() { let mut app = App::new(); app.add_plugins(InputPlugin); + app.init_resource::(); + app.init_resource::(); let input_map = test_input_map(); Digit1.press(app.world_mut()); @@ -650,6 +654,8 @@ mod tests { fn handle_clashes_dpad_chord() { let mut app = App::new(); app.add_plugins(InputPlugin); + app.init_resource::(); + app.init_resource::(); let input_map = test_input_map(); ControlLeft.press(app.world_mut()); @@ -700,6 +706,8 @@ mod tests { fn which_pressed() { let mut app = App::new(); app.add_plugins(InputPlugin); + app.init_resource::(); + app.init_resource::(); let input_map = test_input_map(); Digit1.press(app.world_mut());