Collapse built-in phonemizer smoke tests from 18 cases to 6 - #2399
Open
KakaruHayate wants to merge 1 commit into
Open
Collapse built-in phonemizer smoke tests from 18 cases to 6#2399KakaruHayate wants to merge 1 commit into
KakaruHayate wants to merge 1 commit into
Conversation
`PhonemizerTest<T>` declared `CreationTest`, `SetSingerTest` and `DummySingerPhonemizeTest` on an abstract generic base class, and six empty classes derived from it. xunit re-runs inherited facts for every concrete class, so those three checks were actually executed 3 x 6 = 18 times. The three checks are combined into one parameterized test with a single case per phonemizer, keeping the same coverage: * constructible * tolerates a missing singer and a null singer * phonemizes a dummy note with a dummy singer 12 fewer test cases run (each built-in phonemizer now contributes one case instead of three), and the redundant instantiation of every phonemizer is gone. No production code is touched.
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.
OpenUtau.Test/Plugins/PhonemizerTest.csdeclares its three smoke checks on an abstract generic base class and derives six empty classes from it. xunit re-runs inherited facts for every concrete class, soCreationTest,SetSingerTestandDummySingerPhonemizeTestare each executed six times — 18 test cases where 6 suffice.This collapses them into one parameterized test with a single case per built-in phonemizer, keeping identical coverage:
SetSingertolerates a missing singer and a null singerThe state sequence is unchanged (construct →
SetSinger(CreateMissing)→SetSinger(null)→SetSinger(dummy)→Process), so the three checks are merged into one method body rather than rewritten.Verification
dotnet testinpr-test:7ef99328)Exactly 12 fewer test cases, green on all three platforms. Locally the
--list-testsdiff is only the 18 removed entries plus the 6 addedPhonemizerTest.SmokeTestrows (236 → 224 entries).No production code is touched. Happy to keep three separate assertions per phonemizer instead if per-behaviour granularity in the test report is preferred.