T6 探针基建收口段: 三族样板收单点(probe_ui_util树寻址contains/begins_with参数化+isolate_save七份隔离样板/battle_driver五份战斗驱动)+level_autoplay双战斗循环合并_decide_act+test_kit收13套件_check样板(断言数逐套件零丢失对照表在报告)+BAD_DIR夹具共享+smoke_all五件(:953公有面clamped_pool/_battle_st七袋/check_silent并入quiet参/_pct转发删/load改preload);探针小件=main句柄Node类型注/魔法等待常量化/画布常数同源锚注/死参verbose删;红线守住=ui_input case④b与click循环体零触碰/拍板点三件未退役
This commit is contained in:
1 parent
0691a188fd
commit
315e46038c
32 files changed
+587
-764
No files matched your search
@@ -7,23 +7,12 @@
|
||||
# 第一个真实测试:复制本文件为 tests/unit/<system>/<system>_<feature>_test.gd 并替换占位断言
|
||||
extends SceneTree
|
||||
|
||||
func _init() -> void:
|
||||
var failures := 0
|
||||
failures += _check("headless SceneTree 协议可用(quit(code) 通道)", _test_headless_protocol())
|
||||
failures += _check("命名规范可执行:test_[scenario]_[expected]", _test_naming_convention_followed())
|
||||
if failures > 0:
|
||||
push_error("[example_test] %d 项失败" % failures)
|
||||
quit(1)
|
||||
return
|
||||
print("[example_test] all green")
|
||||
quit(0)
|
||||
const Kit := preload("res://tests/unit/test_kit.gd") # T6 收口:check/汇总退出样板单点
|
||||
|
||||
func _check(desc: String, ok: bool) -> int:
|
||||
if not ok:
|
||||
push_error("[example_test] FAIL: " + desc)
|
||||
return 1
|
||||
print("[example_test] PASS: " + desc)
|
||||
return 0
|
||||
func _init() -> void:
|
||||
Kit.check("headless SceneTree 协议可用(quit(code) 通道)", _test_headless_protocol())
|
||||
Kit.check("命名规范可执行:test_[scenario]_[expected]", _test_naming_convention_followed())
|
||||
quit(Kit.finish("example_test"))
|
||||
|
||||
func _test_headless_protocol() -> bool:
|
||||
# 占位断言:验证脚本本身在 SceneTree 上下文可执行。
|
||||
|
||||
Reference in new issue
Block a user