mirror of
https://github.com/Xevion/Pac-Man.git
synced 2026-01-31 06:25:09 -06:00
tests: revamp tests, remove more useless tests
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
use pacman::constants::RAW_BOARD;
|
||||
use pacman::map::Map;
|
||||
|
||||
#[test]
|
||||
fn test_game_map_creation() {
|
||||
let map = Map::new(RAW_BOARD);
|
||||
|
||||
assert!(map.graph.node_count() > 0);
|
||||
assert!(!map.grid_to_node.is_empty());
|
||||
|
||||
// Should find Pac-Man's starting position
|
||||
let pacman_pos = map.find_starting_position(0);
|
||||
assert!(pacman_pos.is_some());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_game_score_initialization() {
|
||||
// This would require creating a full Game instance, but we can test the concept
|
||||
let map = Map::new(RAW_BOARD);
|
||||
assert!(map.find_starting_position(0).is_some());
|
||||
}
|
||||
Reference in New Issue
Block a user