mirror of
https://github.com/Xevion/Pac-Man.git
synced 2025-12-16 10:12:37 -06:00
Compare commits
1 Commits
v0.48.7
...
ae42f6ead0
| Author | SHA1 | Date | |
|---|---|---|---|
| ae42f6ead0 |
@@ -28,7 +28,6 @@ pub trait CommonPlatform {
|
|||||||
fn get_canvas_size(&self) -> Option<(u32, u32)>;
|
fn get_canvas_size(&self) -> Option<(u32, u32)>;
|
||||||
|
|
||||||
/// Loads raw asset data using the appropriate platform-specific method.
|
/// Loads raw asset data using the appropriate platform-specific method.
|
||||||
|
|
||||||
fn get_asset_bytes(&self, asset: Asset) -> Result<Cow<'static, [u8]>, AssetError>;
|
fn get_asset_bytes(&self, asset: Asset) -> Result<Cow<'static, [u8]>, AssetError>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use pacman::map::direction::Direction;
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_game_command_variants() {
|
fn test_game_command_variants() {
|
||||||
// Test that all GameCommand variants can be created
|
// Test that all GameCommand variants can be created
|
||||||
let commands = vec![
|
let commands = [
|
||||||
GameCommand::Exit,
|
GameCommand::Exit,
|
||||||
GameCommand::MovePlayer(Direction::Up),
|
GameCommand::MovePlayer(Direction::Up),
|
||||||
GameCommand::MovePlayer(Direction::Down),
|
GameCommand::MovePlayer(Direction::Down),
|
||||||
@@ -38,17 +38,6 @@ fn test_game_command_equality() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_game_command_copy_clone() {
|
|
||||||
let original = GameCommand::MovePlayer(Direction::Up);
|
|
||||||
let copied = original;
|
|
||||||
let cloned = original.clone();
|
|
||||||
|
|
||||||
assert_eq!(original, copied);
|
|
||||||
assert_eq!(original, cloned);
|
|
||||||
assert_eq!(copied, cloned);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_game_event_variants() {
|
fn test_game_event_variants() {
|
||||||
let command_event = GameEvent::Command(GameCommand::Exit);
|
let command_event = GameEvent::Command(GameCommand::Exit);
|
||||||
|
|||||||
Reference in New Issue
Block a user