mirror of
https://github.com/Xevion/Pac-Man.git
synced 2025-12-10 16:07:57 -06:00
test: small test lint fixes
This commit is contained in:
@@ -354,7 +354,7 @@ impl Map {
|
|||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::constants::{BOARD_CELL_SIZE, CELL_SIZE};
|
use crate::constants::{BOARD_CELL_SIZE, CELL_SIZE};
|
||||||
use glam::{IVec2, UVec2, Vec2};
|
use glam::{IVec2, Vec2};
|
||||||
|
|
||||||
fn create_minimal_test_board() -> [&'static str; BOARD_CELL_SIZE.y as usize] {
|
fn create_minimal_test_board() -> [&'static str; BOARD_CELL_SIZE.y as usize] {
|
||||||
let mut board = [""; BOARD_CELL_SIZE.y as usize];
|
let mut board = [""; BOARD_CELL_SIZE.y as usize];
|
||||||
@@ -498,7 +498,7 @@ mod tests {
|
|||||||
// Check that adjacent walkable tiles are connected
|
// Check that adjacent walkable tiles are connected
|
||||||
// Find any node that has connections
|
// Find any node that has connections
|
||||||
let mut found_connected_node = false;
|
let mut found_connected_node = false;
|
||||||
for (grid_pos, &node_id) in &map.grid_to_node {
|
for &node_id in map.grid_to_node.values() {
|
||||||
let intersection = &map.graph.adjacency_list[node_id];
|
let intersection = &map.graph.adjacency_list[node_id];
|
||||||
if intersection.edges().next().is_some() {
|
if intersection.edges().next().is_some() {
|
||||||
found_connected_node = true;
|
found_connected_node = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user