# tests/system_test.gd — 系统测试宿主薄壳(SceneTree+构造注入) # 系统测试 = 启动真实工程走真实玩法路径的断言面(标准四级测试层之一,闸 01)。 # 本件现宿主零断言——smoke_all.gd 的断言按「只剪切禁改写」纪律迁入(断言迁移批执行, # 本批只落宿主薄壳,跑通即绿)。迁移完成后 tools/run_system_test.py 缺省 --script 改指本件。 # 协议照单元侧惯例:extends SceneTree 获得 quit(code);--script 模式不加载 autoload, # 断言夹具显式实例化 ConfigDB/RngService 构造注入;摘要行由 tools/run_system_test.py 三闸判定 # (退出码+摘要失败数+脚本错误扫描)。 # 运行:python tools/run_system_test.py --script res://tests/system_test.gd extends SceneTree var _failures: int = 0 var _checks: int = 0 func check(cond: bool, label: String) -> void: _checks += 1 if cond: print(" [PASS] " + label) else: _failures += 1 print(" [FAIL] " + label) func _initialize() -> void: print("=== Dungeon Sweeper 系统测试(宿主薄壳——断言面待迁移批自 smoke_all.gd 迁入) ===") print("[system_test] 摘要:%d 项检查,%d 项失败" % [_checks, _failures]) quit(1 if _failures > 0 else 0)