You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've encountered a mutant that I wasn't able to remove in a Java 17 code base using PITest (1.15.0) in conjunction with JUnit5 (5.9.3) test cases. The code is a bit niche and poorly written but I managed to recreate it in this repository.
Thanks for the report and the reproducable sample.
The problem is that this is a mutation called only from static initialization code. This means the code is exectued only once per jvm and causes multiple problems for mutation testing (theres an entry on this in the FAQ which I can't link to as I seem to have cunningly include no anchors in the page).
Pitest avoids mutating code in static initializers and tries to avoid mutating code called only from static initializers. The filtering doesn't seem to be working in this case, probably because the code predates lambdas and hasn't been updated.
I've encountered a mutant that I wasn't able to remove in a Java 17 code base using PITest (1.15.0) in conjunction with JUnit5 (5.9.3) test cases. The code is a bit niche and poorly written but I managed to recreate it in this repository.
Details
The mutant lives at this line:
https://github.com/Shawn-Armstrong/mutation_case/blob/0fc16a8e8d0f8a2a883898e9aa4ea2759c27abc4/app/src/main/java/myjavaproject2/Toto.java#L19
The report indicated the following mutation:
The full report can be viewed here.
I suspect this might have something to do with low level details related the JVM / compiler and how it instantiates
ENUM
andstatic final
fields.The text was updated successfully, but these errors were encountered: