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

Turns on the new mutator set by default #710

Merged
merged 1 commit into from
Dec 15, 2019
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 @@ -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