From a039306f027524d500c29db5edc4e721124e925e Mon Sep 17 00:00:00 2001 From: DKChan <524912269@qq.com> Date: Sat, 24 Oct 2026 05:41:14 +0800 Subject: [PATCH] =?UTF-8?q?test(=E8=BF=AD=E4=BB=A335=E5=8D=A1=E2=91=A0):?= =?UTF-8?q?=20fv4=20=E8=87=B4=E5=91=BD=E5=AD=90=E8=BF=9B=E7=A8=8B=E5=88=A4?= =?UTF-8?q?=E6=8D=AE=E6=94=B9=E4=B8=89=E5=88=86=E9=80=80=E5=87=BA=E7=A0=81?= =?UTF-8?q?=EF=BC=880=20=E9=9D=99=E9=BB=98=EF=BC=8F2=20=E5=A4=B1=E6=95=88?= =?UTF-8?q?=E5=88=86=E6=94=AF=EF=BC=8F=E5=85=B6=E4=BD=99=E9=9D=9E=E9=9B=B6?= =?UTF-8?q?=EF=BC=9D=E8=87=B4=E5=91=BD=E4=B8=AD=E6=AD=A2=EF=BC=89=E2=80=94?= =?UTF-8?q?=E2=80=94=E4=BD=BF=E3=80=8C=E6=97=A0=E8=A7=A3=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E6=94=B9=E8=BF=94=E5=9B=9E=E7=A9=BA=E5=9B=BE=E3=80=8D=E5=8F=98?= =?UTF-8?q?=E5=BC=82=E8=83=BD=E8=AE=A9=E6=96=AD=E8=A8=80=E8=A7=81=E7=BA=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game/tests/unit/core/node_map_growth_test.gd | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/game/tests/unit/core/node_map_growth_test.gd b/game/tests/unit/core/node_map_growth_test.gd index 434d4f36..b0d3fe0b 100644 --- a/game/tests/unit/core/node_map_growth_test.gd +++ b/game/tests/unit/core/node_map_growth_test.gd @@ -85,7 +85,10 @@ func _test_fatal_subprocess() -> void: var out := [] var code: int = OS.execute(bin, ["--headless", "--path", game_dir, "--script", "res://tests/unit/core/node_map_growth_test.gd", "--", "fatal-fixture"], out, true) - Kit.check("无解参数档产图进程致命中止(退出码非零,无残图交付)〔fv4〕", code != 0) + # 退出码三分:0 = 子进程正常收尾(致命通道静默);2 = 无解后仍走完 quit(2) 的失效分支; + # 其余非零(含 assert/OS.crash 中止码)=致命中止真实发生。 + print("[fv4] 无解子进程退出码 = %d" % code) + Kit.check("无解参数档产图进程致命中止(退出码既非 0 亦非失效分支 2,无残图交付)〔fv4〕", code != 0 and code != 2) func _trigger_fatal() -> void: @@ -95,7 +98,7 @@ func _trigger_fatal() -> void: "rest_ratio": 0.2, "shop_ratio": 0.1, "entry_count": 1, "exit_count": 3, "battle_floor": 4, "fork_ways_min": 2, "fork_ways_max": 3} gen.generate(unsolvable, 42) - # 走到这里=致命通道未止住(软回退缺陷)→ 显式退出码 2 与崩溃码区分 + # 走到这里=致命通道未止住(软回退缺陷)→ 显式退出码 2,父断言按「非 0 且非 2」判致命是否真发生 push_error("[fatal-fixture] 参数无解未致命中止(fail-fast 失效回归)") quit(2)