Issue #13109: Kill mutation for ReturnCountCheck#13138
Merged
romani merged 1 commit intocheckstyle:masterfrom Jun 12, 2023
Merged
Issue #13109: Kill mutation for ReturnCountCheck#13138romani merged 1 commit intocheckstyle:masterfrom
romani merged 1 commit intocheckstyle:masterfrom
Conversation
Contributor
Author
|
Github, generate report |
Contributor
Author
|
Github, generate report |
47c2eb8 to
1fc218f
Compare
romani
requested changes
Jun 6, 2023
src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/ReturnCountCheckTest.java
Outdated
Show resolved
Hide resolved
romani
requested changes
Jun 7, 2023
src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/ReturnCountCheckTest.java
Outdated
Show resolved
Hide resolved
src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/ReturnCountCheckTest.java
Outdated
Show resolved
Hide resolved
7348d09 to
3103243
Compare
rdiachenko
requested changes
Jun 8, 2023
src/test/java/com/puppycrawl/tools/checkstyle/checks/coding/ReturnCountCheckTest.java
Outdated
Show resolved
Hide resolved
40 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.
Issue #13109: Kill mutation for ReturnCountCheck
Check :-
https://checkstyle.org/config_coding.html#ReturnCount
Mutation Covered
checkstyle/config/pitest-suppressions/pitest-coding-1-suppressions.xml
Lines 39 to 55 in 655196e
Explaination
1) Test cases
Here in this check, we have an acceptable token
checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ReturnCountCheck.java
Lines 332 to 338 in 655196e
and in visitToken and Leave Token all the acceptable tokens have their own case.
so without pure unit testing not possible to create such kind of scenario to cover default.
2) Removal of code
Here in this check, we have an acceptable token
checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/coding/ReturnCountCheck.java
Lines 332 to 338 in 655196e
and in visitToken and Leave Token all the acceptable tokens have their own case so Removal of default won't make any issue.
Regression are also clean
Currently applied 1) Test cases