Search in sources :

Example 1 with BooleanLiteralAmplifier

use of eu.stamp_project.dspot.amplifier.amplifiers.BooleanLiteralAmplifier in project dspot by STAMP-project.

the class BooleanLiteralAmplifierTest method setup.

@Before
public void setup() throws Exception {
    super.setUp();
    literalMutationClass = findClass("fr.inria.amp.LiteralMutation");
    RandomHelper.setSeedRandom(42L);
    amplifier = new BooleanLiteralAmplifier();
}
Also used : BooleanLiteralAmplifier(eu.stamp_project.dspot.amplifier.amplifiers.BooleanLiteralAmplifier) Before(org.junit.Before)

Example 2 with BooleanLiteralAmplifier

use of eu.stamp_project.dspot.amplifier.amplifiers.BooleanLiteralAmplifier in project dspot by STAMP-project.

the class BooleanLiteralAmplifierTest method testAmplify.

@Test
public void testAmplify() {
    final String nameMethod = "methodBoolean";
    CtClass<Object> literalMutationClass = launcher.getFactory().Class().get("fr.inria.amp.LiteralMutation");
    RandomHelper.setSeedRandom(42L);
    Amplifier mutator = new BooleanLiteralAmplifier();
    CtMethod method = literalMutationClass.getMethod(nameMethod);
    List<CtMethod> mutantMethods = amplifier.amplify(method, 0).collect(Collectors.toList());
    assertEquals(1, mutantMethods.size());
}
Also used : BooleanLiteralAmplifier(eu.stamp_project.dspot.amplifier.amplifiers.BooleanLiteralAmplifier) Amplifier(eu.stamp_project.dspot.amplifier.amplifiers.Amplifier) BooleanLiteralAmplifier(eu.stamp_project.dspot.amplifier.amplifiers.BooleanLiteralAmplifier) CtMethod(spoon.reflect.declaration.CtMethod) Test(org.junit.Test)

Aggregations

BooleanLiteralAmplifier (eu.stamp_project.dspot.amplifier.amplifiers.BooleanLiteralAmplifier)2 Amplifier (eu.stamp_project.dspot.amplifier.amplifiers.Amplifier)1 Before (org.junit.Before)1 Test (org.junit.Test)1 CtMethod (spoon.reflect.declaration.CtMethod)1