test(迭代35卡①): 合流图夹具改按契约 2 语义重写(合法合流=第二入口直插主链取长路值+声明深度虚高必拒)——使深度赋值判据可被变异拦下;代拍板追认单落 reports/
This commit is contained in:
1 parent
16c776e9f3
commit
a391512e98
2 files changed
+43
-8
No files matched your search
@@ -340,15 +340,26 @@ func _test_negative_fixtures() -> void:
|
||||
{"id": 1, "type": "battle", "depth": 1, "next": []}])
|
||||
Kit.check("非 Boss 终点夹具命中「终点(无出边)非 Boss」判据〔fv1〕",
|
||||
_has_msg(_gen.validate_output(noBoss), "终点(无出边)非 Boss"))
|
||||
# 合流图深度赋值语义(契约 2):跳边让某节点的最长路径值高于其声明值 → 必须被拒
|
||||
var conf_short := _fx([
|
||||
{"id": 0, "type": "battle", "depth": 0, "next": [1, 3]},
|
||||
# 合流图深度赋值语义(契约 2「自入口最长路径步数」):
|
||||
# (a) 合法合流——第二入口直插主链中段,该节点深度必须取长路值而非短路值
|
||||
var conf_legal := _fx([
|
||||
{"id": 0, "type": "battle", "depth": 0, "next": [1]},
|
||||
{"id": 1, "type": "battle", "depth": 1, "next": [2]},
|
||||
{"id": 2, "type": "reward", "depth": 2, "next": [3]},
|
||||
{"id": 3, "type": "shop", "depth": 1, "next": [4]},
|
||||
{"id": 4, "type": "boss", "depth": 4, "next": []}])
|
||||
Kit.check("合流图深度写 shortest(=1)被拒(须最长路径步数)〔fv1〕",
|
||||
_has_msg(_gen.validate_output(conf_short), "自入口最长路径步数"))
|
||||
{"id": 2, "type": "battle", "depth": 2, "next": [3]},
|
||||
{"id": 3, "type": "shop", "depth": 3, "next": [4]},
|
||||
{"id": 4, "type": "boss", "depth": 4, "next": []},
|
||||
{"id": 5, "type": "battle", "depth": 0, "next": [3]}])
|
||||
Kit.check("合法合流图(第二入口直插主链,深度取最长路 3)自证零错误〔fv1〕",
|
||||
_gen.validate_output(conf_legal).is_empty())
|
||||
# (b) 声明深度高于真实最长路值 → 必被拒(前进方向不破,专测深度判据)
|
||||
var conf_high := _fx([
|
||||
{"id": 0, "type": "battle", "depth": 0, "next": [1]},
|
||||
{"id": 1, "type": "battle", "depth": 1, "next": [2]},
|
||||
{"id": 2, "type": "battle", "depth": 2, "next": [3]},
|
||||
{"id": 3, "type": "shop", "depth": 4, "next": [4]},
|
||||
{"id": 4, "type": "boss", "depth": 5, "next": []}])
|
||||
Kit.check("声明深度高于最长路径步数被拒(深度=自入口最长路径步数)〔fv1〕",
|
||||
_has_msg(_gen.validate_output(conf_high), "自入口最长路径步数"))
|
||||
# 环/回边:深度不前进
|
||||
var loop := _fx([
|
||||
{"id": 0, "type": "battle", "depth": 0, "next": [1]},
|
||||
|
||||
Reference in new issue
Block a user