Repository navigation
Add unit tests for ArgumentParser and ColorChecker - #355
Merged
Merged
Conversation
Characterization tests for how command arguments are joined back into messages and how config color names resolve to ChatColor, including the white fallback for mixed-case and unknown names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Matches PluginYmlContractTest; under a Turkish default locale LIGHT_PURPLE would otherwise lower-case to a dotless-i spelling. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
Self-review rubric (posted as a plain comment; it is not an independent review):
Findings:
This comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener). drafted by Claude on behalf of Daniel Stephenson |
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.
Summary
Stage B (unit-test expansion) cycle: characterization tests are added for two utility classes that every chat and card command depends on but that had no tests.
ArgumentParserTest(8 tests) —createStringFromFirstArgOnwards(used by the/cardsetters,/bird,/me//emote) andcreateStringFromArgs(used by/whisper,/yell,/lo,/title). Joining with single spaces, start index at/past the end returning"", empty arguments kept rather than collapsed, and theArrayIndexOutOfBoundsExceptionon an empty array (every caller guardsargs.lengthfirst).ColorCheckerTest(6 tests) —getColorByName, which resolves the color options documented inCONFIG.md. All 16 colors resolve from their all-lower-case and all-upper-case names; mixed-case (Red), unknown (pink,dark-red,"") and formatting-code names (bold) fall back to white;nullthrowsNullPointerException.CHANGELOG.md— oneAddedbullet under[Unreleased].No production code is changed. The mixed-case fallback is recorded as current behavior, not endorsed;
CONFIG.mdlists only lower-case examples, so no doc drift was found.Test plan
mvn test— 30 tests run (14 new), 0 failures,BUILD SUCCESS(local JDK 21)Buildworkflow green on the PR head (JDK 8)Deferred issues
No open issue was picked up this cycle; each was deferred for the reason given:
This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).
🤖 Generated with Claude Code
drafted by Claude on behalf of Daniel Stephenson