style(simulation): gate bounce — box GenCompletion::BodyAnalyzed state; clippy/fmt sweeps
BodyWorldState grew past clippy's large-enum-variant threshold when it began retaining Layer1Output (T-1170 Ruling 4b) — boxed, with the two insert sites deref'd; manual_contains x2 (drainage tests), cloned_ref_to_slice_refs x3 (river_course tests), fmt wraps. gen_queue 18/18; clippy -D warnings clean; fmt --check clean. Tickets: T-1170 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -2158,8 +2158,15 @@ mod tests {
|
||||
basin_dirs.insert(pos_east, BasinDirection::East);
|
||||
basin_dirs.insert(pos_south, BasinDirection::South);
|
||||
|
||||
let districts =
|
||||
derive_all_districts(test_seed(), ¶ms, &ta, 8, "test_body", Some(&basin_dirs), None);
|
||||
let districts = derive_all_districts(
|
||||
test_seed(),
|
||||
¶ms,
|
||||
&ta,
|
||||
8,
|
||||
"test_body",
|
||||
Some(&basin_dirs),
|
||||
None,
|
||||
);
|
||||
|
||||
assert_eq!(districts[&pos_east].basin_direction, BasinDirection::East);
|
||||
assert_eq!(districts[&pos_south].basin_direction, BasinDirection::South);
|
||||
@@ -2423,7 +2430,17 @@ mod tests {
|
||||
for i in 0..20 {
|
||||
let wx = (100 + i * 37) as f64 * dm;
|
||||
let wy = (100 + i * 53) as f64 * dm;
|
||||
let uncut = derive_at_metres(test_seed(), "test_body", &p, &ta, wx, wy, &climate, 0.0, &[]);
|
||||
let uncut = derive_at_metres(
|
||||
test_seed(),
|
||||
"test_body",
|
||||
&p,
|
||||
&ta,
|
||||
wx,
|
||||
wy,
|
||||
&climate,
|
||||
0.0,
|
||||
&[],
|
||||
);
|
||||
let cut = derive_at_metres(
|
||||
test_seed(),
|
||||
"test_body",
|
||||
@@ -2466,8 +2483,28 @@ mod tests {
|
||||
for i in 0..12 {
|
||||
let wx = (300 + i * 41) as f64 * dm * 0.1;
|
||||
let wy = (300 + i * 29) as f64 * dm * 0.1;
|
||||
let a = derive_at_metres(test_seed(), "test_body", &p, &ta, wx, wy, &climate, 1_024.0, &[]);
|
||||
let b = derive_at_metres(test_seed(), "test_body", &p, &ta, wx, wy, &climate, 1_024.0, &[]);
|
||||
let a = derive_at_metres(
|
||||
test_seed(),
|
||||
"test_body",
|
||||
&p,
|
||||
&ta,
|
||||
wx,
|
||||
wy,
|
||||
&climate,
|
||||
1_024.0,
|
||||
&[],
|
||||
);
|
||||
let b = derive_at_metres(
|
||||
test_seed(),
|
||||
"test_body",
|
||||
&p,
|
||||
&ta,
|
||||
wx,
|
||||
wy,
|
||||
&climate,
|
||||
1_024.0,
|
||||
&[],
|
||||
);
|
||||
assert_district_profiles_eq(&a, &b);
|
||||
}
|
||||
}
|
||||
@@ -2499,8 +2536,28 @@ mod tests {
|
||||
for i in 0..20 {
|
||||
let wx = (150 + i * 47) as f64 * dm;
|
||||
let wy = (150 + i * 31) as f64 * dm;
|
||||
let a = derive_at_metres(test_seed(), "test_body", &p, &ta, wx, wy, &climate, 4_096.0, &[]);
|
||||
let b = derive_at_metres(test_seed(), "test_body", &p, &ta, wx, wy, &climate, 4_096.0, &[]);
|
||||
let a = derive_at_metres(
|
||||
test_seed(),
|
||||
"test_body",
|
||||
&p,
|
||||
&ta,
|
||||
wx,
|
||||
wy,
|
||||
&climate,
|
||||
4_096.0,
|
||||
&[],
|
||||
);
|
||||
let b = derive_at_metres(
|
||||
test_seed(),
|
||||
"test_body",
|
||||
&p,
|
||||
&ta,
|
||||
wx,
|
||||
wy,
|
||||
&climate,
|
||||
4_096.0,
|
||||
&[],
|
||||
);
|
||||
assert_district_profiles_eq(&a, &b);
|
||||
}
|
||||
}
|
||||
@@ -2553,10 +2610,28 @@ mod tests {
|
||||
for i in 0..20 {
|
||||
let wx = (150 + i * 47) as f64 * dm;
|
||||
let wy = (150 + i * 31) as f64 * dm;
|
||||
let district =
|
||||
derive_at_metres(test_seed(), "test_body", &p, &ta, wx, wy, &climate, 4_096.0, &[]);
|
||||
let quarter =
|
||||
derive_at_metres(test_seed(), "test_body", &p, &ta, wx, wy, &climate, 1_024.0, &[]);
|
||||
let district = derive_at_metres(
|
||||
test_seed(),
|
||||
"test_body",
|
||||
&p,
|
||||
&ta,
|
||||
wx,
|
||||
wy,
|
||||
&climate,
|
||||
4_096.0,
|
||||
&[],
|
||||
);
|
||||
let quarter = derive_at_metres(
|
||||
test_seed(),
|
||||
"test_body",
|
||||
&p,
|
||||
&ta,
|
||||
wx,
|
||||
wy,
|
||||
&climate,
|
||||
1_024.0,
|
||||
&[],
|
||||
);
|
||||
if district.elev_q != quarter.elev_q
|
||||
|| district.slope_q != quarter.slope_q
|
||||
|| district.moisture_q != quarter.moisture_q
|
||||
@@ -2669,8 +2744,17 @@ mod tests {
|
||||
for dx in -2..2 {
|
||||
let wx = base_wx + dx as f64 * qm;
|
||||
let wy = base_wy + dy as f64 * qm;
|
||||
let prof =
|
||||
derive_at_metres(test_seed(), "test_body", &p, &ta, wx, wy, &climate, 1_024.0, &[]);
|
||||
let prof = derive_at_metres(
|
||||
test_seed(),
|
||||
"test_body",
|
||||
&p,
|
||||
&ta,
|
||||
wx,
|
||||
wy,
|
||||
&climate,
|
||||
1_024.0,
|
||||
&[],
|
||||
);
|
||||
if prof.vegetation_class != VegetationClass::Marine {
|
||||
*tally.entry(prof.vegetation_class as u8).or_insert(0) += 1;
|
||||
}
|
||||
@@ -2783,7 +2867,17 @@ mod tests {
|
||||
let wx = 40.0 * dm;
|
||||
let wy = 20.0 * dm;
|
||||
let orbital = derive_orbital_at_metres(test_seed(), "test_body", &p, &ta, wx, wy, &climate);
|
||||
let full = derive_at_metres(test_seed(), "test_body", &p, &ta, wx, wy, &climate, 0.0, &[]);
|
||||
let full = derive_at_metres(
|
||||
test_seed(),
|
||||
"test_body",
|
||||
&p,
|
||||
&ta,
|
||||
wx,
|
||||
wy,
|
||||
&climate,
|
||||
0.0,
|
||||
&[],
|
||||
);
|
||||
|
||||
// The invented scatter is a bounded perturbation on top of the raw
|
||||
// envelope (detail_scatter's amplitude is capped well under 100 elev_q
|
||||
|
||||
Reference in New Issue
Block a user