Skip to content

Commit

Permalink
Merge pull request #710 from hcoles/change_defaults
Browse files Browse the repository at this point in the history
Turns on the new mutator set by default
  • Loading branch information
hcoles authored Dec 15, 2019
2 parents 41a3aa0 + f2174a5 commit d3453f1
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class LoggingCallsFilterTest {
@Before
public void setUp() {
final ClassloaderByteArraySource source = ClassloaderByteArraySource.fromContext();
final Collection<MethodMutatorFactory> mutators = Mutator.defaults();
final Collection<MethodMutatorFactory> mutators = Mutator.oldDefaults();
this.mutator = new GregorMutater(source, m -> true, mutators);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class MutantExportInterceptorTest {

@Before
public void setUp() {
final Collection<MethodMutatorFactory> mutators = Mutator.defaults();
final Collection<MethodMutatorFactory> mutators = Mutator.oldDefaults();
this.mutator = new GregorMutater(this.source, m -> true, mutators);
this.testee = new MutantExportInterceptor(this.fileSystem, this.source, "target");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ private static Collection<? extends MethodMutatorFactory> createMutatorListFromA
if ((mutators != null) && !mutators.isEmpty()) {
return Mutator.fromStrings(mutators);
} else {
return Mutator.defaults();
return Mutator.newDefaults();
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -289,7 +289,7 @@ public static Collection<MethodMutatorFactory> all() {

private static Collection<MethodMutatorFactory> stronger() {
return combine(
defaults(),
newDefaults(),
group(new RemoveConditionalMutator(Choice.EQUAL, false),
new SwitchMutator()));
}
Expand All @@ -305,7 +305,7 @@ private static Collection<MethodMutatorFactory> combine(
* Default set of mutators - designed to provide balance between strength and
* performance
*/
public static Collection<MethodMutatorFactory> defaults() {
public static Collection<MethodMutatorFactory> oldDefaults() {
return group(InvertNegsMutator.INVERT_NEGS_MUTATOR,
ReturnValsMutator.RETURN_VALS_MUTATOR, MathMutator.MATH_MUTATOR,
VoidMethodCallMutator.VOID_METHOD_CALL_MUTATOR,
Expand Down

0 comments on commit d3453f1

Please sign in to comment.