From f2174a5b7a61a7b1fb650db67e3dd0105d2a6665 Mon Sep 17 00:00:00 2001 From: hcoles Date: Fri, 6 Dec 2019 07:10:55 +0000 Subject: [PATCH] makes new_defaults the default --- .../javafeatures/TryWithResourcesFilterTest.java | 2 +- .../build/intercept/logging/LoggingCallsFilterTest.java | 2 +- .../pitest/plugin/export/MutantExportInterceptorTest.java | 2 +- .../engine/gregor/config/GregorEngineFactory.java | 2 +- .../pitest/mutationtest/engine/gregor/config/Mutator.java | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pitest-entry/src/test/java/org/pitest/mutationtest/build/intercept/javafeatures/TryWithResourcesFilterTest.java b/pitest-entry/src/test/java/org/pitest/mutationtest/build/intercept/javafeatures/TryWithResourcesFilterTest.java index 908566880..c3baf9770 100644 --- a/pitest-entry/src/test/java/org/pitest/mutationtest/build/intercept/javafeatures/TryWithResourcesFilterTest.java +++ b/pitest-entry/src/test/java/org/pitest/mutationtest/build/intercept/javafeatures/TryWithResourcesFilterTest.java @@ -12,7 +12,7 @@ public class TryWithResourcesFilterTest { TryWithResourcesFilter testee = new TryWithResourcesFilter(); - FilterTester verifier = new FilterTester(PATH, this.testee, Mutator.defaults()); + FilterTester verifier = new FilterTester(PATH, this.testee, Mutator.oldDefaults()); @Test public void shouldDeclareTypeAsFilter() { diff --git a/pitest-entry/src/test/java/org/pitest/mutationtest/build/intercept/logging/LoggingCallsFilterTest.java b/pitest-entry/src/test/java/org/pitest/mutationtest/build/intercept/logging/LoggingCallsFilterTest.java index 7baac3674..f6f3e6f7e 100644 --- a/pitest-entry/src/test/java/org/pitest/mutationtest/build/intercept/logging/LoggingCallsFilterTest.java +++ b/pitest-entry/src/test/java/org/pitest/mutationtest/build/intercept/logging/LoggingCallsFilterTest.java @@ -30,7 +30,7 @@ public class LoggingCallsFilterTest { @Before public void setUp() { final ClassloaderByteArraySource source = ClassloaderByteArraySource.fromContext(); - final Collection mutators = Mutator.defaults(); + final Collection mutators = Mutator.oldDefaults(); this.mutator = new GregorMutater(source, m -> true, mutators); } diff --git a/pitest-entry/src/test/java/org/pitest/plugin/export/MutantExportInterceptorTest.java b/pitest-entry/src/test/java/org/pitest/plugin/export/MutantExportInterceptorTest.java index 75d351a4a..d87760de5 100644 --- a/pitest-entry/src/test/java/org/pitest/plugin/export/MutantExportInterceptorTest.java +++ b/pitest-entry/src/test/java/org/pitest/plugin/export/MutantExportInterceptorTest.java @@ -29,7 +29,7 @@ public class MutantExportInterceptorTest { @Before public void setUp() { - final Collection mutators = Mutator.defaults(); + final Collection mutators = Mutator.oldDefaults(); this.mutator = new GregorMutater(this.source, m -> true, mutators); this.testee = new MutantExportInterceptor(this.fileSystem, this.source, "target"); } diff --git a/pitest/src/main/java/org/pitest/mutationtest/engine/gregor/config/GregorEngineFactory.java b/pitest/src/main/java/org/pitest/mutationtest/engine/gregor/config/GregorEngineFactory.java index d80847352..4680ae699 100644 --- a/pitest/src/main/java/org/pitest/mutationtest/engine/gregor/config/GregorEngineFactory.java +++ b/pitest/src/main/java/org/pitest/mutationtest/engine/gregor/config/GregorEngineFactory.java @@ -49,7 +49,7 @@ private static Collection createMutatorListFromA if ((mutators != null) && !mutators.isEmpty()) { return Mutator.fromStrings(mutators); } else { - return Mutator.defaults(); + return Mutator.newDefaults(); } } diff --git a/pitest/src/main/java/org/pitest/mutationtest/engine/gregor/config/Mutator.java b/pitest/src/main/java/org/pitest/mutationtest/engine/gregor/config/Mutator.java index 17901b1ce..e77baf68e 100644 --- a/pitest/src/main/java/org/pitest/mutationtest/engine/gregor/config/Mutator.java +++ b/pitest/src/main/java/org/pitest/mutationtest/engine/gregor/config/Mutator.java @@ -176,10 +176,10 @@ public final class Mutator { researchMutators(); addGroup("REMOVE_SWITCH", RemoveSwitchMutator.makeMutators()); - addGroup("DEFAULTS", defaults()); + addGroup("OLD_DEFAULTS", oldDefaults()); addGroup("STRONGER", stronger()); addGroup("ALL", all()); - addGroup("NEW_DEFAULTS", newDefaults()); + addGroup("DEFAULTS", newDefaults()); addGroup("AOR", aor()); addGroup("AOD", aod()); addGroup("CRCR", crcr()); @@ -289,7 +289,7 @@ public static Collection all() { private static Collection stronger() { return combine( - defaults(), + newDefaults(), group(new RemoveConditionalMutator(Choice.EQUAL, false), new SwitchMutator())); } @@ -305,7 +305,7 @@ private static Collection combine( * Default set of mutators - designed to provide balance between strength and * performance */ - public static Collection defaults() { + public static Collection oldDefaults() { return group(InvertNegsMutator.INVERT_NEGS_MUTATOR, ReturnValsMutator.RETURN_VALS_MUTATOR, MathMutator.MATH_MUTATOR, VoidMethodCallMutator.VOID_METHOD_CALL_MUTATOR,