fix(playable): close release validation lifecycle gaps

This commit is contained in:
shen
2026-09-11 21:23:44 +08:00
parent f39a55fdd5
commit cc5573ddc1
13 changed files with 230 additions and 7 deletions
+14
View File
@@ -203,10 +203,24 @@ func valid_config() -> Dictionary:
"resolution": [1280, 720], "loops": 1, "timeout_seconds": 900,
}
func test_probe_releases_old_registries() -> void:
var observer := Probe.new()
for i in range(30):
var registry := FakeFx.new()
var reference: WeakRef = weakref(registry)
observer.watch_local(registry, "fx_spawned", "fx_spawned")
observer.watch_local(registry, "fx_finished", "fx_finished")
check(observer.bound_count() == 2, "probe prunes old scene bindings")
registry = null
check(reference.get_ref() == null, "probe does not retain the old scene's effect registry")
observer.disconnect_all()
observer.free()
func run() -> void:
MapCoord.set_base(Vector2.ZERO)
test_config_contract()
test_report_contract()
test_probe_releases_old_registries()
test_happy_path()
test_gameplay_not_allowed()
test_absent_slot_fails_without_select()