feat: add full supported API details for variants and enhance tests

This commit is contained in:
Patryk Gensch
2026-06-19 00:20:46 +02:00
parent 0666692198
commit ce44e30c60
3 changed files with 55 additions and 7 deletions

View File

@@ -97,6 +97,17 @@ def test_hash_prefix_is_stripped_for_grouping():
assert "333ab0c4_PIKLIB8.dll" in files
def test_variant_carries_full_supported_api():
# the baseline: each variant lists *what is there*, grouped by class — not just the diff
t = compatibility_table([
Entry("Game A", _snap("X.dll", ["SHOW", "HIDE"], events=["ONCLICK"])),
])
api = t["libraries"][0]["variants"][0]["api"]
assert [m["name"] for m in api["classes"]["CMC_Animo"]["methods"]] == ["HIDE", "SHOW"]
assert [e["name"] for e in api["classes"]["CMC_Animo"]["events"]] == ["ONCLICK"]
assert [t_["script_name"] for t_ in api["types"]] == ["ANIMO"]
def test_grouping_is_case_insensitive_keeps_common_spelling():
t = compatibility_table([
Entry("Game A", _snap("Piklib8.dll", ["SHOW"])),