P07-01-WX: 仕上がった天候の機能の受入:自然天候・雨・嵐・世界樹と成人客のマナ霧・上部の表示と予報・保存と移行(マナ炉の産出 120 を除く。P07-01 の補助の作業。原単位への加算 0)
This commit is contained in:
@@ -55,19 +55,28 @@ func _check_restarts(handoff: Dictionary) -> void:
|
||||
_expect(Fixture.sha256(final_state) == str(handoff.get("straight_final_state_sha256", "")), "the writer's final state arrived intact")
|
||||
var saves: Array = handoff.get("saves", [])
|
||||
_expect(saves.size() == Fixture.SAVE_MINUTES.size(), "every save package was handed off")
|
||||
var after: Dictionary = handoff.get("after_states", {})
|
||||
for save: Variant in saves:
|
||||
var minute := int((save as Dictionary).get("minute", -1))
|
||||
var path := Fixture.READER_SAVE % minute
|
||||
_expect(_write_package(save, path), "save package at minute %d arrived byte-exact" % minute)
|
||||
var expected_state := Marshalls.base64_to_raw(str((save as Dictionary).get("state_base64", "")))
|
||||
var next_row: Dictionary = after.get(str(minute + 1), {})
|
||||
var next_state := Marshalls.base64_to_raw(str(next_row.get("base64", "")))
|
||||
_expect(not next_state.is_empty() and Fixture.sha256(next_state) == str(next_row.get("sha256", "")), "the writer's state one minute after %d arrived intact" % minute)
|
||||
var fixture := fixtures.new_fixture(false)
|
||||
var runtime: Variant = fixture[&"runtime"]
|
||||
_expect(bool(runtime.load_from_path(path).get(&"ok", false)), "the reader loads the minute %d save" % minute)
|
||||
_expect(fixtures.state_bytes(runtime) == expected_state and fixture[&"clock"].absolute_minute == minute, "the minute %d save resumes the writer's weather, holds, stream and plans" % minute)
|
||||
if minute == 363:
|
||||
_expect(runtime.weather.get_rain_holds() == {String(Fixture.HELD_GUEST): Fixture.HOLD} and runtime.guest_service.get_guest(Fixture.HELD_GUEST) != null
|
||||
and runtime.guest_service.get_guest(Fixture.HELD_GUEST).planned_exit_at == 602, "the reader resumes the one hold of the present held guest and its extended plan")
|
||||
# Loading replaces the event stream, so the draw counter subscribes again.
|
||||
fixture[&"draws"][&"count"] = 0
|
||||
fixtures.watch_draws(fixture)
|
||||
fixtures.play(fixture, minute, Fixture.LAST_MINUTE, Callable())
|
||||
fixtures.play(fixture, minute, minute + 1, Callable())
|
||||
_expect(fixtures.state_bytes(runtime) == next_state, "one minute after the minute %d save the reader equals the writer (no second extension)" % minute)
|
||||
fixtures.play(fixture, minute + 1, Fixture.LAST_MINUTE, Callable())
|
||||
var expected_draws := 0
|
||||
for draw_minute: int in Fixture.DRAW_MINUTES:
|
||||
if draw_minute > minute:
|
||||
|
||||
Reference in New Issue
Block a user