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

temporarily remove dynamic call tracking #1295

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,11 @@ private void analyseClass(ClassTree tree) {
}

private List<Location> allCallsFor(ClassTree tree, MethodTree m) {
return Stream.concat(callsFor(tree,m), invokeDynamicCallsFor(tree,m))
.collect(Collectors.toList());
// temporarily disable dynamic calls as they are more likely to be involved
// in storing delayed execution code within static fields.
return callsFor(tree,m).collect(Collectors.toList());
// return Stream.concat(callsFor(tree,m), invokeDynamicCallsFor(tree,m))
// .collect(Collectors.toList());
}

private Stream<Location> callsFor(ClassTree tree, MethodTree m) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.example.staticinitializers.SecondLevelPrivateMethods;
import com.example.staticinitializers.SingletonWithWorkInInitializer;
import com.example.staticinitializers.ThirdLevelPrivateMethods;
import org.junit.Ignore;
import org.junit.Test;
import org.pitest.mutationtest.engine.MutationDetails;
import org.pitest.mutationtest.engine.gregor.mutators.NullMutateEverything;
Expand Down Expand Up @@ -145,6 +146,7 @@ public void analysisDoesNotGetStuckInInfiniteLoop() {
}

@Test
@Ignore("temporally disabled while filtering reworked")
public void filtersMutantsInEnumPrivateMethodsCalledViaMethodRef() {
v.forClass(EnumWithLambdaInConstructor.class)
.forMutantsMatching(inMethodStartingWith("doStuff"))
Expand All @@ -154,6 +156,7 @@ public void filtersMutantsInEnumPrivateMethodsCalledViaMethodRef() {
}

@Test
@Ignore("temporally disabled while filtering reworked")
public void filtersMutantsInLambdaCalledFromStaticInitializerInNestedEnum() {
v.forClass(NestedEnumWithLambdaInStaticInitializer.TOYS.class)
.forMutantsMatching(inMethodStartingWith("lambda"))
Expand Down