diff --git a/server/src/atlas/road_graph.rs b/server/src/atlas/road_graph.rs index 329ba5b69..7c078d697 100644 --- a/server/src/atlas/road_graph.rs +++ b/server/src/atlas/road_graph.rs @@ -2146,13 +2146,13 @@ mod tests { let grid = RouteGrid::build(&ta, &[], w, h); assert_eq!(grid.scale, 3, "grid_w=180 must downsample at scale=3 for ROUTE_W=64"); - let majority_water_cell = 0 * grid.rw + 3; + let majority_water_cell = 3; // row-major (row 0, col 3) assert_eq!( grid.cost[majority_water_cell], IMPASSABLE, "2-of-3 native cells water (a true majority) must be IMPASSABLE" ); - let minority_water_cell = 0 * grid.rw + 6; + let minority_water_cell = 6; // row-major (row 0, col 6) assert_ne!( grid.cost[minority_water_cell], IMPASSABLE, @@ -2174,7 +2174,7 @@ mod tests { (0, 3), "the surrogate must NOT be the impassable cell itself" ); - assert!(ring >= 1 && ring <= COASTAL_ANCHOR_MAX_RING); + assert!((1..=COASTAL_ANCHOR_MAX_RING).contains(&ring)); } /// T-1116 boundary case: a settlement placement fully surrounded by