Repository navigation
XML: derive totals in tests from the actual state of ceridwen - #9
Merged
Merged
Conversation
- The world-load tests compared item and creature counts with fixed totals, 176 and 25, which ceridwen has long outgrown. They now count the XML with XDocument and apply the loader's expansion rules: an item plus one per variant in each group it names and each variant it names singly, and a creature plus one per subtype. - Every other count reads subdirectories and skips .ignore paths, as the loader does. Maps moved into subdirectories, so the old top-level count expected none. - GetTotal adds the variants, which the loader stores individually as well as in their groups. - The derived count shows one item lost on every ceridwen since 2023: two variants without a modifier gave Variant All Belt two variants with the same id, and one replaced the other. 176 was the count with that item missing. Ceridwen's fix is separate. Refs: HXML-1
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9 +/- ##
==========================================
+ Coverage 61.11% 61.57% +0.45%
==========================================
Files 43 43
Lines 1538 1538
Branches 349 349
==========================================
+ Hits 940 947 +7
+ Misses 484 482 -2
+ Partials 114 109 -5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Caeldeth
approved these changes
Oct 23, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes a long-standing bug in xml where we were manually counting variants in ceridwen, which leads to, well, annoyances. This PR counts the XML files with XDocument and applies our expansion rules to get the total.
Addresses HXML-1 / HTOO-580.