Repository navigation
test(buffs): a level type on a buff value is an unknown field - #1183
Merged
Merged
Conversation
Mutizens#1180 checked that a buff duration with a level type gets the shared item value reader's "does nothing" warning. Mutizens#1179, merged after it, gave buffs their own value reader without levels, which reports the level type as an unknown field and keeps the entry. The test now expects that.
12 of 15 tasks
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.
Main has failed one test since #1179 merged:
Buffs: an unknown field is a warning, and the entry is kept [data][buffs](tests/data/test_buffs.cpp), on Linux, macOS and Windows (main CI run 45091390683: 1 failure of 3296). The other open PRs, such as #1038, fail on this test only.Why: the two PRs worked fine alone, but they clash once both are merged. #1180 (wings' options) added a check that a buff duration with
"levelType": "itemLevel"gets the shared item value reader's "does nothing on one value" warning. At that time buffs read their values with that shared reader. #1179 (skill buff values), merged after #1180, gave buffs their own value reader (one number,perterms,maximum), and that reader does not knowlevelType. So it now reportsbuffs[0].duration.levelTypeas "unknown field, ignored" and keeps the entry.The reader is right: a buff value has no levels, so the buff format has no level type. This PR changes only the test. It now expects the unknown-field warning and checks that the entry is kept. No game code changes.
Testing:
buff_data_testspasses locally (Windows, Release).