fix(test): add missing fields to stale struct literals across workspace tests
Four E0063 compile errors broke `cargo test --workspace --no-run`, blocking
`./run dist:test` on the DO fleet. Each is a stale struct literal in test/test-cfg
code that drifted from its current definition:
- mc-worldsim event_dispatch low_bio_thresholds: BiologicalThresholds missing
migration_drought_factor / migration_drought_max (p3-21 drought coupling) —
set to 0.0 / 1.0 to keep the helper's migration-suppression intent.
- mc-mod-host wasm_controller_{noop,limits}: TacticalState missing embark_level —
Default::default() (EmbarkLevel::None) to match the empty-state intent.
- api-gdext ai.rs tile_with + ai_controller test: TacticalTile missing explored /
TacticalState missing embark_level — explored:true (pre-field default = seen),
embark_level default.
Mirrors the sibling fix 04fabbc1c. `cargo test --workspace --no-run` now compiles
clean; full suite passes except 3 pre-existing GPU-parity tests (Metal fp drift,
unrelated to these changes).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
153f430c48
commit
d4c4a5aa1b
5 changed files with 6 additions and 0 deletions
|
|
@ -1075,6 +1075,7 @@ mod tests {
|
|||
resource: None,
|
||||
is_coast: false,
|
||||
owner: None,
|
||||
explored: true,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ fn minimal_tactical_state_json_parses() {
|
|||
unit_catalog: Vec::new(),
|
||||
building_catalog: Vec::new(),
|
||||
difficulty_threshold_mult: 1.0,
|
||||
embark_level: Default::default(),
|
||||
};
|
||||
let json = serde_json::to_string(&minimal).expect("serialize");
|
||||
let parsed = parse_tactical_state_json(&json).expect("parse");
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ fn empty_state() -> TacticalState {
|
|||
unit_catalog: Vec::new(),
|
||||
building_catalog: Vec::new(),
|
||||
difficulty_threshold_mult: 1.0,
|
||||
embark_level: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ fn empty_state() -> TacticalState {
|
|||
unit_catalog: Vec::new(),
|
||||
building_catalog: Vec::new(),
|
||||
difficulty_threshold_mult: 1.0,
|
||||
embark_level: Default::default(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -322,6 +322,8 @@ mod tests {
|
|||
migration_differential_min: 3.0,
|
||||
migration_trigger_chance: 1.0,
|
||||
migration_max_hops: 3,
|
||||
migration_drought_factor: 0.0, // disable drought coupling in this helper
|
||||
migration_drought_max: 1.0,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue