-
Notifications
You must be signed in to change notification settings - Fork 273
Improve test coverage #732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ff46e31 to
f9e5165
Compare
Add some more tests to cover a bit more. Also apply some IDE-suggestions, assert-order, simplify assertions.
garydgregory
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@centic9
Thank you for your updates.
See: Improve test coverage #732.
|
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> |

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.