test(@projects/@magic-civilization): ✅ flip stale GdTechWeb absent-sentinel — binding has landed
test_gdextension_contract asserted GdTechWeb does NOT exist (mc-tech backlog), but the crate + binding have since landed (`#[class(base=RefCounted)] GdTechWeb` at api-gdext/src/lib.rs:7770; positive coverage in test_tech_web.gd). Per the test's own instruction, removed the ABSENT_CLASSES sentinel and flipped test_gd_tech_web_absent → test_gd_tech_web_present (guards against regression). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
060af304f9
commit
9e6d9ccb48
1 changed files with 12 additions and 13 deletions
|
|
@ -111,13 +111,9 @@ const CONTRACT: Dictionary = {
|
|||
|
||||
## Classes that should NOT exist. Any regression where one of these accidentally
|
||||
## gets registered would silently change game behavior — this sentinel catches it.
|
||||
const ABSENT_CLASSES: Dictionary = {
|
||||
"GdTechWeb": (
|
||||
"mc-tech crate + GdTechWeb binding were planned but never landed. "
|
||||
+ "tech_web.gd is a stub placeholder. If this assertion fails, the binding "
|
||||
+ "has landed — update test_tech_web.gd and remove this sentinel."
|
||||
),
|
||||
}
|
||||
## (GdTechWeb was removed once the mc-tech crate + binding landed at lib.rs:7770;
|
||||
## positive coverage now lives in test_tech_web.gd.)
|
||||
const ABSENT_CLASSES: Dictionary = {}
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
|
@ -351,11 +347,14 @@ func test_gd_mc_tree_controller_has_expected_methods() -> void:
|
|||
# in `tests/unit/ai/test_ai_controller_accessor.gd`.
|
||||
|
||||
|
||||
func test_gd_tech_web_absent() -> void:
|
||||
## mc-tech crate is still backlog; tech_web.gd is a GDScript stub. If this
|
||||
## test fails, the Rust binding landed — rehydrate test_tech_web.gd and
|
||||
## remove this sentinel (and add GdTechWeb to CONTRACT).
|
||||
assert_false(
|
||||
func test_gd_tech_web_present() -> void:
|
||||
## mc-tech crate + GdTechWeb binding have landed (lib.rs:7770); positive
|
||||
## coverage lives in test_tech_web.gd. This guards against the binding
|
||||
## regressing back out of the registry.
|
||||
if not ClassDB.class_exists("GdMcTreeController"):
|
||||
pending("godot-rust GDExtension not loaded")
|
||||
return
|
||||
assert_true(
|
||||
ClassDB.class_exists("GdTechWeb"),
|
||||
ABSENT_CLASSES["GdTechWeb"],
|
||||
"GdTechWeb binding should be registered (mc-tech crate has landed)",
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue