style(simulation): cargo fmt — review-round test code wraps
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -3070,7 +3070,12 @@ mod tests {
|
|||||||
(lo.min(p.1), hi.max(p.1))
|
(lo.min(p.1), hi.max(p.1))
|
||||||
});
|
});
|
||||||
let margin = 50_000.0;
|
let margin = 50_000.0;
|
||||||
let window_rect = (min_x - margin, min_y - margin, max_x + margin, max_y + margin);
|
let window_rect = (
|
||||||
|
min_x - margin,
|
||||||
|
min_y - margin,
|
||||||
|
max_x + margin,
|
||||||
|
max_y + margin,
|
||||||
|
);
|
||||||
|
|
||||||
let wire = crop_course_to_window(
|
let wire = crop_course_to_window(
|
||||||
&course,
|
&course,
|
||||||
@@ -3083,7 +3088,12 @@ mod tests {
|
|||||||
0.0,
|
0.0,
|
||||||
station_spacing_m,
|
station_spacing_m,
|
||||||
)
|
)
|
||||||
.unwrap_or_else(|| panic!("Mouth edge {:?} cropped to nothing in its own window", edge.edge_id));
|
.unwrap_or_else(|| {
|
||||||
|
panic!(
|
||||||
|
"Mouth edge {:?} cropped to nothing in its own window",
|
||||||
|
edge.edge_id
|
||||||
|
)
|
||||||
|
});
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
wire.terminus,
|
wire.terminus,
|
||||||
@@ -3159,8 +3169,7 @@ mod tests {
|
|||||||
.find(|e| e.terminus == river_course::EdgeTerminusKind::Mouth)
|
.find(|e| e.terminus == river_course::EdgeTerminusKind::Mouth)
|
||||||
.expect("GJ1c fixture must have at least one Mouth edge");
|
.expect("GJ1c fixture must have at least one Mouth edge");
|
||||||
|
|
||||||
let course =
|
let course = river_course::invent_course(seed, edge, &ta, ¶ms, station_spacing_m, 0.0);
|
||||||
river_course::invent_course(seed, edge, &ta, ¶ms, station_spacing_m, 0.0);
|
|
||||||
assert!(
|
assert!(
|
||||||
course.points.len() >= 2,
|
course.points.len() >= 2,
|
||||||
"need a non-degenerate course to construct a meaningful upstream cut"
|
"need a non-degenerate course to construct a meaningful upstream cut"
|
||||||
@@ -3291,7 +3300,12 @@ mod tests {
|
|||||||
heightmap
|
heightmap
|
||||||
};
|
};
|
||||||
|
|
||||||
let dr = drainage::analyze(&working.data, working.width, working.height, working.sea_level);
|
let dr = drainage::analyze(
|
||||||
|
&working.data,
|
||||||
|
working.width,
|
||||||
|
working.height,
|
||||||
|
working.sea_level,
|
||||||
|
);
|
||||||
let ta = crate::atlas::features::TerrainAnalysis::analyze(&working, &dr);
|
let ta = crate::atlas::features::TerrainAnalysis::analyze(&working, &dr);
|
||||||
let rn = &dr.river_network;
|
let rn = &dr.river_network;
|
||||||
|
|
||||||
@@ -3302,7 +3316,10 @@ mod tests {
|
|||||||
.iter()
|
.iter()
|
||||||
.find(|e| e.edge_id == river_course::pack_cell_id(target_px))
|
.find(|e| e.edge_id == river_course::pack_cell_id(target_px))
|
||||||
.expect("GJ380c must have a Mouth edge at the live-captured cell");
|
.expect("GJ380c must have a Mouth edge at the live-captured cell");
|
||||||
assert_eq!(edge.edge_id, 4129122, "must be the same edge the live capture reported");
|
assert_eq!(
|
||||||
|
edge.edge_id, 4129122,
|
||||||
|
"must be the same edge the live capture reported"
|
||||||
|
);
|
||||||
|
|
||||||
let seed = SeedChain::for_body(0, "GJ380c"); // production default world_seed
|
let seed = SeedChain::for_body(0, "GJ380c"); // production default world_seed
|
||||||
let climate = crate::atlas::district_profile::ClimateConstants::default();
|
let climate = crate::atlas::district_profile::ClimateConstants::default();
|
||||||
|
|||||||
Reference in New Issue
Block a user