Skip to content
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

Resolve Pitest suppression for block profile #12296

Closed
Kevin222004 opened this issue Oct 11, 2022 · 5 comments
Closed

Resolve Pitest suppression for block profile #12296

Kevin222004 opened this issue Oct 11, 2022 · 5 comments

Comments

@Kevin222004
Copy link
Collaborator

Related to #7797

kill mutation

<suppressedMutations>
<mutation unstable="false">
<sourceFile>EmptyBlockCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.blocks.EmptyBlockCheck</mutatedClass>
<mutatedMethod>setOption</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator</mutator>
<description>replaced call to java/lang/String::toUpperCase with receiver</description>
<lineContent>option = BlockOption.valueOf(optionStr.trim().toUpperCase(Locale.ENGLISH));</lineContent>
</mutation>

and
<mutation unstable="false">
<sourceFile>EmptyBlockCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.blocks.EmptyBlockCheck</mutatedClass>
<mutatedMethod>setOption</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator</mutator>
<description>replaced call to java/lang/String::trim with receiver</description>
<lineContent>option = BlockOption.valueOf(optionStr.trim().toUpperCase(Locale.ENGLISH));</lineContent>
</mutation>

and
<mutation unstable="false">
<sourceFile>LeftCurlyCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.blocks.LeftCurlyCheck</mutatedClass>
<mutatedMethod>setOption</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator</mutator>
<description>replaced call to java/lang/String::toUpperCase with receiver</description>
<lineContent>option = LeftCurlyOption.valueOf(optionStr.trim().toUpperCase(Locale.ENGLISH));</lineContent>
</mutation>

and
<mutation unstable="false">
<sourceFile>LeftCurlyCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.blocks.LeftCurlyCheck</mutatedClass>
<mutatedMethod>setOption</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator</mutator>
<description>replaced call to java/lang/String::trim with receiver</description>
<lineContent>option = LeftCurlyOption.valueOf(optionStr.trim().toUpperCase(Locale.ENGLISH));</lineContent>
</mutation>

and
<mutation unstable="false">
<sourceFile>RightCurlyCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.blocks.RightCurlyCheck</mutatedClass>
<mutatedMethod>setOption</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator</mutator>
<description>replaced call to java/lang/String::toUpperCase with receiver</description>
<lineContent>option = RightCurlyOption.valueOf(optionStr.trim().toUpperCase(Locale.ENGLISH));</lineContent>
</mutation>

and
<mutation unstable="false">
<sourceFile>RightCurlyCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.blocks.RightCurlyCheck</mutatedClass>
<mutatedMethod>setOption</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator</mutator>
<description>replaced call to java/lang/String::trim with receiver</description>
<lineContent>option = RightCurlyOption.valueOf(optionStr.trim().toUpperCase(Locale.ENGLISH));</lineContent>
</mutation>

@Kevin222004
Copy link
Collaborator Author

I have contained a lots of mutation just a single pr because it is as similar as 4f9c2a4

only requirement is of test file

@Kevin222004
Copy link
Collaborator Author

I am on it

@rnveach
Copy link
Member

rnveach commented Oct 11, 2022

@Kevin222004 Did that PR resolve this issue?

Edit: From the mutations it looks like it did, let me know if I am wrong.

@rnveach rnveach added this to the 10.3.5 milestone Oct 11, 2022
@rnveach rnveach closed this as completed Oct 11, 2022
@Kevin222004
Copy link
Collaborator Author

@Kevin222004 Did that PR resolve this issue?

Edit: From the mutations it looks like it did, let me know if I am wrong.

Report is actually ready
May be , I forget to put it after making pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants