mirror of
https://github.com/Xevion/Pac-Man.git
synced 2025-12-15 04:12:34 -06:00
* Initial plan * Remove 9 redundant and non-valuable tests across events, formatting, and item modules Co-authored-by: Xevion <44609630+Xevion@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Xevion <44609630+Xevion@users.noreply.github.com>
34 lines
553 B
Rust
34 lines
553 B
Rust
use pacman::events::{GameCommand, GameEvent};
|
|
use pacman::map::direction::Direction;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
fn test_game_command_to_game_event_conversion_all_variants() {
|
|
let commands = vec![
|
|
GameCommand::Exit,
|
|
GameCommand::MovePlayer(Direction::Up),
|
|
GameCommand::ToggleDebug,
|
|
GameCommand::MuteAudio,
|
|
GameCommand::ResetLevel,
|
|
GameCommand::TogglePause,
|
|
];
|
|
|
|
for command in commands {
|
|
let event: GameEvent = command.into();
|
|
assert_eq!(event, GameEvent::Command(command));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|