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))
|
||||
});
|
||||
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(
|
||||
&course,
|
||||
@@ -3083,7 +3088,12 @@ mod tests {
|
||||
0.0,
|
||||
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!(
|
||||
wire.terminus,
|
||||
@@ -3159,8 +3169,7 @@ mod tests {
|
||||
.find(|e| e.terminus == river_course::EdgeTerminusKind::Mouth)
|
||||
.expect("GJ1c fixture must have at least one Mouth edge");
|
||||
|
||||
let course =
|
||||
river_course::invent_course(seed, edge, &ta, ¶ms, station_spacing_m, 0.0);
|
||||
let course = river_course::invent_course(seed, edge, &ta, ¶ms, station_spacing_m, 0.0);
|
||||
assert!(
|
||||
course.points.len() >= 2,
|
||||
"need a non-degenerate course to construct a meaningful upstream cut"
|
||||
@@ -3291,7 +3300,12 @@ mod tests {
|
||||
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 rn = &dr.river_network;
|
||||
|
||||
@@ -3302,7 +3316,10 @@ mod tests {
|
||||
.iter()
|
||||
.find(|e| e.edge_id == river_course::pack_cell_id(target_px))
|
||||
.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 climate = crate::atlas::district_profile::ClimateConstants::default();
|
||||
|
||||
Reference in New Issue
Block a user