Skip to content

Commit

Permalink
⬆️ Upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
pierreyoda committed Oct 30, 2023
1 parent 22842c4 commit 6f053d6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ default = []
tracing = []

[dependencies]
log = "0.4.17"
toml = "0.7.2"
log = "0.4.20"
toml = "0.8.6"

[dependencies.clap]
version = "4.1.6"
version = "4.4.7"
features = ["derive", "wrap_help"]

[dependencies.sdl2]
Expand Down
25 changes: 17 additions & 8 deletions src/bin/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,22 @@ mod test {
let r = super::keyboard_hm_from_config(config, "*test*".into());
assert!(r.is_ok());
let keys_hm = r.unwrap();
assert_eq!(*keys_hm.get("Up".into()).unwrap(), JoypadKey::Up);
assert_eq!(*keys_hm.get("Down".into()).unwrap(), JoypadKey::Down);
assert_eq!(*keys_hm.get("Left".into()).unwrap(), JoypadKey::Left);
assert_eq!(*keys_hm.get("Right".into()).unwrap(), JoypadKey::Right);
assert_eq!(*keys_hm.get("Numpad1".into()).unwrap(), JoypadKey::Select);
assert_eq!(*keys_hm.get("Numpad3".into()).unwrap(), JoypadKey::Start);
assert_eq!(*keys_hm.get("E".into()).unwrap(), JoypadKey::A);
assert_eq!(*keys_hm.get("T".into()).unwrap(), JoypadKey::B);
assert_eq!(keys_hm.get(&"Up".to_string()).unwrap(), &JoypadKey::Up);
assert_eq!(keys_hm.get(&"Down".to_string()).unwrap(), &JoypadKey::Down);
assert_eq!(keys_hm.get(&"Left".to_string()).unwrap(), &JoypadKey::Left);
assert_eq!(
keys_hm.get(&"Right".to_string()).unwrap(),
&JoypadKey::Right
);
assert_eq!(
keys_hm.get(&"Numpad1".to_string()).unwrap(),
&JoypadKey::Select
);
assert_eq!(
keys_hm.get(&"Numpad3".to_string()).unwrap(),
&JoypadKey::Start
);
assert_eq!(keys_hm.get(&"E".to_string()).unwrap(), &JoypadKey::A);
assert_eq!(keys_hm.get(&"T".to_string()).unwrap(), &JoypadKey::B);
}
}

0 comments on commit 6f053d6

Please sign in to comment.