From 5a72b65891fceaf89d6287f6b2a901fab3ee5676 Mon Sep 17 00:00:00 2001 From: Henry Coles Date: Wed, 6 Oct 2021 11:27:46 +0100 Subject: [PATCH] replace negate conditional with remove conditional --- README.md | 4 ++++ .../engine/gregor/config/StandardMutatorGroups.java | 6 ++++-- .../mutationtest/engine/gregor/config/MutatorTest.java | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2d71e7bb8..990ef6f5d 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,10 @@ Read all about it at http://pitest.org ## Releases +### 1.7.2 (unreleased) + +* #943 Change default mutators - replace negate conditional with remove conditional + ### 1.7.1 * #932 Improve switch mutation descriptions diff --git a/pitest/src/main/java/org/pitest/mutationtest/engine/gregor/config/StandardMutatorGroups.java b/pitest/src/main/java/org/pitest/mutationtest/engine/gregor/config/StandardMutatorGroups.java index 80e204caf..5da5448cb 100644 --- a/pitest/src/main/java/org/pitest/mutationtest/engine/gregor/config/StandardMutatorGroups.java +++ b/pitest/src/main/java/org/pitest/mutationtest/engine/gregor/config/StandardMutatorGroups.java @@ -20,13 +20,15 @@ public void register(Map> mutators) { mutators.put("DEFAULTS", gather(mutators,"INVERT_NEGS", "MATH", "VOID_METHOD_CALLS", - "NEGATE_CONDITIONALS", + "REMOVE_CONDITIONALS_ORDER_ELSE", + "REMOVE_CONDITIONALS_EQUAL_ELSE", "CONDITIONALS_BOUNDARY", "INCREMENTS", "RETURNS")); mutators.put("STRONGER", gather(mutators,"DEFAULTS", "EXPERIMENTAL_SWITCH", - "REMOVE_CONDITIONALS_EQUAL_ELSE")); + "REMOVE_CONDITIONALS_ORDER_IF", + "REMOVE_CONDITIONALS_EQUAL_IF")); } diff --git a/pitest/src/test/java/org/pitest/mutationtest/engine/gregor/config/MutatorTest.java b/pitest/src/test/java/org/pitest/mutationtest/engine/gregor/config/MutatorTest.java index 584593ea9..b3a9ebb20 100644 --- a/pitest/src/test/java/org/pitest/mutationtest/engine/gregor/config/MutatorTest.java +++ b/pitest/src/test/java/org/pitest/mutationtest/engine/gregor/config/MutatorTest.java @@ -160,7 +160,7 @@ public void providesRemoveSwitchGroup() { @Test public void providesDefaultsGroup() { - assertGroupHasSize("DEFAULTS", 11); + assertGroupHasSize("DEFAULTS", 12); } @Test @@ -170,7 +170,7 @@ public void providesOldDefaultsGroup() { @Test public void providesStrongerGroup() { - assertGroupHasSize("STRONGER", 13); + assertGroupHasSize("STRONGER", 15); } @Test