diff --git a/src/game/engine/tests/integration/test_p2_46_replay_bridge.gd b/src/game/engine/tests/integration/test_p2_46_replay_bridge.gd index aef8acd9..3c04cf65 100644 --- a/src/game/engine/tests/integration/test_p2_46_replay_bridge.gd +++ b/src/game/engine/tests/integration/test_p2_46_replay_bridge.gd @@ -69,6 +69,11 @@ func test_open_returns_false_for_missing_game() -> void: var ok_malformed: bool = archive.open(_archive_root, "age-of-dwarves", "not-a-uuid") assert_false(ok_malformed, "open() must return false for a malformed game_id") + # Both open() calls deliberately log engine errors for the bad input — + # mark them expected so GUT doesn't flag them as unexpected. + assert_engine_error("archive io error") + assert_engine_error("invalid game_id") + ## Assertion 3: goto_turn() on an unloaded GdReplayPlayer returns an empty ## Dictionary (the safe default when no history is loaded). @@ -77,6 +82,8 @@ func test_goto_turn_returns_empty_dict_when_no_history() -> void: var snap: Dictionary = player.goto_turn(1) assert_true(snap is Dictionary, "goto_turn() must return a Dictionary") assert_eq(snap.size(), 0, "goto_turn() with no loaded history must return empty Dictionary") + # goto_turn with no loaded history deliberately logs an engine error — expected. + assert_engine_error("no history loaded") ## Helper: remove a directory tree recursively (best-effort, ignores errors). diff --git a/src/game/engine/tests/unit/test_prologue_driver.gd b/src/game/engine/tests/unit/test_prologue_driver.gd index 64ff77e2..577daf4c 100644 --- a/src/game/engine/tests/unit/test_prologue_driver.gd +++ b/src/game/engine/tests/unit/test_prologue_driver.gd @@ -91,6 +91,8 @@ func test_load_script_accepts_default_rejects_garbage_when_available() -> void: assert_ne(script_json, "", "default start script readable") assert_true(driver.load_script(script_json), "load_script accepts the bundled default") assert_false(driver.load_script("{ not valid json"), "load_script rejects malformed JSON") + # The malformed-JSON rejection deliberately logs an engine error — expected. + assert_engine_error("malformed script JSON") func test_dispatch_chronicle_events_routes_to_eventbus() -> void: