Skip to content

Commit

Permalink
update gamepad tests
Browse files Browse the repository at this point in the history
  • Loading branch information
100-TomatoJuice committed Oct 12, 2023
1 parent 1fe9af6 commit d305f44
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions crates/bevy_input/src/gamepad.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1504,9 +1504,9 @@ mod tests {
fn test_axis_settings_default_filter() {
let cases = [
(1.0, Some(1.0)),
(0.99, Some(1.0)),
(0.96, Some(1.0)),
(0.95, Some(1.0)),
(0.99, Some(0.99)),
(0.96, Some(0.96)),
(0.95, Some(0.95)),
(0.9499, Some(0.9499)),
(0.84, Some(0.84)),
(0.43, Some(0.43)),
Expand All @@ -1516,9 +1516,9 @@ mod tests {
(0.01, Some(0.0)),
(0.0, Some(0.0)),
(-1.0, Some(-1.0)),
(-0.99, Some(-1.0)),
(-0.96, Some(-1.0)),
(-0.95, Some(-1.0)),
(-0.99, Some(-0.99)),
(-0.96, Some(-0.96)),
(-0.95, Some(-0.95)),
(-0.9499, Some(-0.9499)),
(-0.84, Some(-0.84)),
(-0.43, Some(-0.43)),
Expand All @@ -1544,15 +1544,15 @@ mod tests {
(0.43, Some(0.17), Some(0.43)),
(0.43, Some(0.84), Some(0.43)),
(0.05, Some(0.055), Some(0.0)),
(0.95, Some(0.945), Some(1.0)),
(0.95, Some(0.945), None),
(-0.43, Some(-0.44001), Some(-0.43)),
(-0.43, Some(-0.44), None),
(-0.43, Some(-0.43), None),
(-0.43, Some(-0.41999), Some(-0.43)),
(-0.43, Some(-0.17), Some(-0.43)),
(-0.43, Some(-0.84), Some(-0.43)),
(-0.05, Some(-0.055), Some(0.0)),
(-0.95, Some(-0.945), Some(-1.0)),
(-0.95, Some(-0.945), None),
];

for (new_value, old_value, expected) in cases {
Expand Down

0 comments on commit d305f44

Please sign in to comment.