Merged
Conversation
ff46e31 to
f9e5165
Compare
Add some more tests to cover a bit more. Also apply some IDE-suggestions, assert-order, simplify assertions.
Member
garydgregory
left a comment
There was a problem hiding this comment.
@centic9
Thank you for your PR. I can see that this improves the coverage in all except one case.
Please address all of my comments, and I will get this merged.
src/test/java/org/apache/commons/text/lookup/StringLookupFactoryTest.java
Outdated
Show resolved
Hide resolved
| DateFormat.getInstance().parse(formatted); // throws ParseException | ||
| Locale prev = Locale.getDefault(); | ||
| try { | ||
| // ensure that date-parser uses English/American presets |
Member
Member
Author
There was a problem hiding this comment.
The test fails for me locally when the OS is set to "de" instead of "us".
I don't see @DefaultLocale anywhere, do you have a link?
Anyway, reverted for now as it actually does not increase coverage, but just fixes a local test failure for me.
Member
There was a problem hiding this comment.
src/test/java/org/apache/commons/text/similarity/IntersectionResultTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/apache/commons/text/similarity/LevenshteinResultsTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/apache/commons/text/lookup/StringLookupFactoryTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/apache/commons/text/similarity/LongestCommonSubsequenceTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/apache/commons/text/translate/UnicodeUnescaperTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/apache/commons/text/StringSubstitutorTest.java
Outdated
Show resolved
Hide resolved
Remove added @deprecated Remove comments which silence warnings in IDEs Inline local variables
This reverts commit 5a6af9e.
garydgregory
approved these changes
Dec 12, 2025
Member
garydgregory
left a comment
There was a problem hiding this comment.
@centic9
Thank you for your updates.
garydgregory
added a commit
that referenced
this pull request
Dec 12, 2025
See: Improve test coverage #732.
Member
|
Thank you @centic9 <commons.jacoco.haltOnFailure>true</commons.jacoco.haltOnFailure>
<commons.jacoco.classRatio>1.00</commons.jacoco.classRatio>
<commons.jacoco.instructionRatio>0.99</commons.jacoco.instructionRatio>
<commons.jacoco.methodRatio>0.99</commons.jacoco.methodRatio>
<commons.jacoco.branchRatio>0.95</commons.jacoco.branchRatio>
<commons.jacoco.lineRatio>0.99</commons.jacoco.lineRatio>
<commons.jacoco.complexityRatio>0.97</commons.jacoco.complexityRatio> |
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.

A few test-adjustments:
Thanks for your contribution to Apache Commons! Your help is appreciated!
Before you push a pull request, review this list:
mvn; that'smvnon the command line by itself.