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

Multiplemutants #313

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

brendanwallace
Copy link

Retool mutant instrumentation to allow for multiple active mutants

Allows multiple mutants to be active at once by:

  • changing activeMutation (integer) to activeMutations (Set) in MutationObserver
  • introduce an isActive() method
  • changing the ASM code to call isActive() to check whether to active a mutation.

This caused three tests to fail from expecting the wrong number of branch conditions and I'm not sure why (including changes to fix these tests, but would like some input on why they're failing and what other tests to add). Also aware that the commits haven't been squashed yet, etc.

@@ -73,7 +79,14 @@ public static void deactivateMutation() {
* @param mutation a {@link org.evosuite.coverage.mutation.Mutation} object.
*/
public static void deactivateMutation(Mutation mutation) {
activeMutation = -1;
activeMutations.clear();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine, just wondering whether you intended to do activeMutations.remove(mutation.getId()) or something like that rather than deactivating all mutants? Otherwise we should maybe drop the parameter and rename the method to deactivateMutations() ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants