Add symbolic company target runtime import
This commit is contained in:
parent
4ff6d65774
commit
f918d0c4f7
17 changed files with 1230 additions and 80 deletions
|
|
@ -173,6 +173,7 @@ mod tests {
|
|||
world_restore: RuntimeWorldRestoreState::default(),
|
||||
metadata: BTreeMap::new(),
|
||||
companies: Vec::new(),
|
||||
selected_company_id: None,
|
||||
packed_event_collection: None,
|
||||
event_runtime_records: Vec::new(),
|
||||
candidate_availability: BTreeMap::new(),
|
||||
|
|
@ -326,9 +327,11 @@ mod tests {
|
|||
metadata: BTreeMap::new(),
|
||||
companies: vec![rrt_runtime::RuntimeCompany {
|
||||
company_id: 42,
|
||||
controller_kind: rrt_runtime::RuntimeCompanyControllerKind::Human,
|
||||
current_cash: 100,
|
||||
debt: 0,
|
||||
}],
|
||||
selected_company_id: Some(42),
|
||||
packed_event_collection: None,
|
||||
event_runtime_records: Vec::new(),
|
||||
candidate_availability: BTreeMap::new(),
|
||||
|
|
|
|||
|
|
@ -76,6 +76,12 @@ pub struct ExpectedRuntimeSummary {
|
|||
#[serde(default)]
|
||||
pub packed_event_blocked_missing_company_context_count: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub packed_event_blocked_missing_selection_context_count: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub packed_event_blocked_missing_company_role_context_count: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub packed_event_blocked_missing_condition_context_count: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub packed_event_blocked_missing_compact_control_count: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub packed_event_blocked_unmapped_real_descriptor_count: Option<usize>,
|
||||
|
|
@ -377,6 +383,30 @@ impl ExpectedRuntimeSummary {
|
|||
));
|
||||
}
|
||||
}
|
||||
if let Some(count) = self.packed_event_blocked_missing_selection_context_count {
|
||||
if actual.packed_event_blocked_missing_selection_context_count != count {
|
||||
mismatches.push(format!(
|
||||
"packed_event_blocked_missing_selection_context_count mismatch: expected {count}, got {}",
|
||||
actual.packed_event_blocked_missing_selection_context_count
|
||||
));
|
||||
}
|
||||
}
|
||||
if let Some(count) = self.packed_event_blocked_missing_company_role_context_count {
|
||||
if actual.packed_event_blocked_missing_company_role_context_count != count {
|
||||
mismatches.push(format!(
|
||||
"packed_event_blocked_missing_company_role_context_count mismatch: expected {count}, got {}",
|
||||
actual.packed_event_blocked_missing_company_role_context_count
|
||||
));
|
||||
}
|
||||
}
|
||||
if let Some(count) = self.packed_event_blocked_missing_condition_context_count {
|
||||
if actual.packed_event_blocked_missing_condition_context_count != count {
|
||||
mismatches.push(format!(
|
||||
"packed_event_blocked_missing_condition_context_count mismatch: expected {count}, got {}",
|
||||
actual.packed_event_blocked_missing_condition_context_count
|
||||
));
|
||||
}
|
||||
}
|
||||
if let Some(count) = self.packed_event_blocked_missing_compact_control_count {
|
||||
if actual.packed_event_blocked_missing_compact_control_count != count {
|
||||
mismatches.push(format!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue