public final void testEvenExpressionNegationSimplification() { MethodAccess callExp = new MethodAccess(); callExp.expression = new This(); callExp.type = BooleanType.instance; Not not1 = new Not(callExp); not1.type = BooleanType.instance; Not not2 = new Not(not1); not2.type = BooleanType.instance; expressionSimplificationTester(not2, MethodAccess.class, BooleanType.instance, 0, false); }
public final void testOddExpressionNegationSimplification() { MethodAccess callExp = new MethodAccess(); callExp.expression = new This(); callExp.type = BooleanType.instance; Not not1 = new Not(callExp); not1.type = BooleanType.instance; Not not2 = new Not(not1); not2.type = BooleanType.instance; Not not3 = new Not(not2); not3.type = BooleanType.instance; Expression resultExp = expressionSimplificationTester(not3, Not.class, BooleanType.instance, 0, false); assertEquals(((Not) resultExp).expression.getClass(), MethodAccess.class); }