Skip to content

Commit

Permalink
Add workaround for bevyengine/bevy#13915 to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alice-i-cecile committed Jul 24, 2024
1 parent 1c81904 commit 62a966e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/clashing_inputs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;

Expand Down Expand Up @@ -572,6 +572,8 @@ mod tests {
fn resolve_prioritize_longest() {
let mut app = App::new();
app.add_plugins(InputPlugin);
app.init_resource::<AccumulatedMouseMovement>();
app.init_resource::<AccumulatedMouseScroll>();

let input_map = test_input_map();
let simple_clash = input_map.possible_clash(&One, &OneAndTwo).unwrap();
Expand Down Expand Up @@ -620,6 +622,8 @@ mod tests {
fn handle_clashes() {
let mut app = App::new();
app.add_plugins(InputPlugin);
app.init_resource::<AccumulatedMouseMovement>();
app.init_resource::<AccumulatedMouseScroll>();
let input_map = test_input_map();

Digit1.press(app.world_mut());
Expand Down Expand Up @@ -650,6 +654,8 @@ mod tests {
fn handle_clashes_dpad_chord() {
let mut app = App::new();
app.add_plugins(InputPlugin);
app.init_resource::<AccumulatedMouseMovement>();
app.init_resource::<AccumulatedMouseScroll>();
let input_map = test_input_map();

ControlLeft.press(app.world_mut());
Expand Down Expand Up @@ -700,6 +706,8 @@ mod tests {
fn which_pressed() {
let mut app = App::new();
app.add_plugins(InputPlugin);
app.init_resource::<AccumulatedMouseMovement>();
app.init_resource::<AccumulatedMouseScroll>();
let input_map = test_input_map();

Digit1.press(app.world_mut());
Expand Down

0 comments on commit 62a966e

Please sign in to comment.