Issue #13109: Kill mutation for FileContents#13156
Merged
romani merged 1 commit intocheckstyle:masterfrom Jun 7, 2023
Merged
Conversation
Contributor
Author
|
Ready for review |
romani
approved these changes
Jun 4, 2023
Member
There was a problem hiding this comment.
again replaced call to java/util/Collections::unmodifiableMap with argument
but
interesting case.
it is API, so we are ok to merge by pure unit test it as it is api, and we do not know how it will be used so we need to test api method.
I added it to #13142.
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 FileContents
Mutation covered
checkstyle/config/pitest-suppressions/pitest-api-suppressions.xml
Lines 3 to 19 in 82b6ac4
Explaination
Test cases expanded.
If we see
return Collections.unmodifiableMap(cppComments);is mutated toreturn cppComments;. basically Collections. unmodifiable will not allow us to make any updates to the map. if we try to update it it will throwUnsupportedOperationException. so in this test case if we try to remove data from the comment so it will throw the exception