Expose save-world issue state in summaries
This commit is contained in:
parent
40078707c8
commit
77c847afba
2 changed files with 203 additions and 0 deletions
|
|
@ -60,6 +60,20 @@ pub struct ExpectedRuntimeSummary {
|
|||
#[serde(default)]
|
||||
pub world_restore_territory_access_cost: Option<u32>,
|
||||
#[serde(default)]
|
||||
pub world_restore_issue_37_value: Option<u32>,
|
||||
#[serde(default)]
|
||||
pub world_restore_issue_37_multiplier_raw_u32: Option<u32>,
|
||||
#[serde(default)]
|
||||
pub world_restore_issue_37_multiplier_value_f32_text: Option<String>,
|
||||
#[serde(default)]
|
||||
pub world_restore_economic_tuning_mirror_raw_u32: Option<u32>,
|
||||
#[serde(default)]
|
||||
pub world_restore_economic_tuning_mirror_value_f32_text: Option<String>,
|
||||
#[serde(default)]
|
||||
pub world_restore_economic_tuning_lane_count: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub world_restore_economic_tuning_lane_value_f32_text: Option<Vec<String>>,
|
||||
#[serde(default)]
|
||||
pub world_restore_absolute_counter_restore_kind: Option<String>,
|
||||
#[serde(default)]
|
||||
pub world_restore_absolute_counter_adjustment_context: Option<String>,
|
||||
|
|
@ -419,6 +433,70 @@ impl ExpectedRuntimeSummary {
|
|||
));
|
||||
}
|
||||
}
|
||||
if let Some(value) = self.world_restore_issue_37_value {
|
||||
if actual.world_restore_issue_37_value != Some(value) {
|
||||
mismatches.push(format!(
|
||||
"world_restore_issue_37_value mismatch: expected {value}, got {:?}",
|
||||
actual.world_restore_issue_37_value
|
||||
));
|
||||
}
|
||||
}
|
||||
if let Some(value) = self.world_restore_issue_37_multiplier_raw_u32 {
|
||||
if actual.world_restore_issue_37_multiplier_raw_u32 != Some(value) {
|
||||
mismatches.push(format!(
|
||||
"world_restore_issue_37_multiplier_raw_u32 mismatch: expected {value}, got {:?}",
|
||||
actual.world_restore_issue_37_multiplier_raw_u32
|
||||
));
|
||||
}
|
||||
}
|
||||
if let Some(value) = &self.world_restore_issue_37_multiplier_value_f32_text {
|
||||
if actual
|
||||
.world_restore_issue_37_multiplier_value_f32_text
|
||||
.as_ref()
|
||||
!= Some(value)
|
||||
{
|
||||
mismatches.push(format!(
|
||||
"world_restore_issue_37_multiplier_value_f32_text mismatch: expected {value:?}, got {:?}",
|
||||
actual.world_restore_issue_37_multiplier_value_f32_text
|
||||
));
|
||||
}
|
||||
}
|
||||
if let Some(value) = self.world_restore_economic_tuning_mirror_raw_u32 {
|
||||
if actual.world_restore_economic_tuning_mirror_raw_u32 != Some(value) {
|
||||
mismatches.push(format!(
|
||||
"world_restore_economic_tuning_mirror_raw_u32 mismatch: expected {value}, got {:?}",
|
||||
actual.world_restore_economic_tuning_mirror_raw_u32
|
||||
));
|
||||
}
|
||||
}
|
||||
if let Some(value) = &self.world_restore_economic_tuning_mirror_value_f32_text {
|
||||
if actual
|
||||
.world_restore_economic_tuning_mirror_value_f32_text
|
||||
.as_ref()
|
||||
!= Some(value)
|
||||
{
|
||||
mismatches.push(format!(
|
||||
"world_restore_economic_tuning_mirror_value_f32_text mismatch: expected {value:?}, got {:?}",
|
||||
actual.world_restore_economic_tuning_mirror_value_f32_text
|
||||
));
|
||||
}
|
||||
}
|
||||
if let Some(count) = self.world_restore_economic_tuning_lane_count {
|
||||
if actual.world_restore_economic_tuning_lane_count != count {
|
||||
mismatches.push(format!(
|
||||
"world_restore_economic_tuning_lane_count mismatch: expected {count}, got {}",
|
||||
actual.world_restore_economic_tuning_lane_count
|
||||
));
|
||||
}
|
||||
}
|
||||
if let Some(values) = &self.world_restore_economic_tuning_lane_value_f32_text {
|
||||
if &actual.world_restore_economic_tuning_lane_value_f32_text != values {
|
||||
mismatches.push(format!(
|
||||
"world_restore_economic_tuning_lane_value_f32_text mismatch: expected {values:?}, got {:?}",
|
||||
actual.world_restore_economic_tuning_lane_value_f32_text
|
||||
));
|
||||
}
|
||||
}
|
||||
if let Some(kind) = &self.world_restore_absolute_counter_restore_kind {
|
||||
if actual.world_restore_absolute_counter_restore_kind.as_ref() != Some(kind) {
|
||||
mismatches.push(format!(
|
||||
|
|
@ -1297,6 +1375,7 @@ mod tests {
|
|||
"world_flag_count": 1,
|
||||
"company_count": 1,
|
||||
"event_runtime_record_count": 0,
|
||||
"world_restore_economic_tuning_lane_count": 0,
|
||||
"total_company_cash": 250000
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue