mirror of
https://github.com/Xevion/Pac-Man.git
synced 2026-01-31 10:25:06 -06:00
feat!: implement proper error handling, drop most expect() & unwrap() usages
This commit is contained in:
+2
-2
@@ -3,7 +3,7 @@ use pacman::map::Map;
|
||||
|
||||
#[test]
|
||||
fn test_game_map_creation() {
|
||||
let map = Map::new(RAW_BOARD);
|
||||
let map = Map::new(RAW_BOARD).unwrap();
|
||||
|
||||
assert!(map.graph.node_count() > 0);
|
||||
assert!(!map.grid_to_node.is_empty());
|
||||
@@ -16,6 +16,6 @@ fn test_game_map_creation() {
|
||||
#[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);
|
||||
let map = Map::new(RAW_BOARD).unwrap();
|
||||
assert!(map.find_starting_position(0).is_some());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user