Skip to content

Commit

Permalink
Merge pull request #1295 from hcoles/feature/disable_dynamic_call_tra…
Browse files Browse the repository at this point in the history
…cking

temporarily remove dynamic call tracking
  • Loading branch information
hcoles committed Jan 23, 2024
2 parents 9defbc4 + 9fd345d commit 3c5f4d9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
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

0 comments on commit 3c5f4d9

Please sign in to comment.