Пример #1
0
 private void andWithFalse(boolean withSideEffect, boolean falseOnLeft) {
   And and = new And();
   and.type = BooleanType.instance;
   False falseExp = new False();
   falseExp.type = BooleanType.instance;
   java.lang.Class expectedClass;
   if (withSideEffect) expectedClass = And.class;
   else expectedClass = False.class;
   operationWithConstantValue(and, expectedClass, falseExp, falseOnLeft, withSideEffect);
 }
Пример #2
0
  public void trivialAndTester(boolean firstIsTrue, boolean secondIsTrue) {
    And and = new And();
    and.left = firstIsTrue ? new True() : new False();
    and.left.type = BooleanType.instance;
    and.right = secondIsTrue ? new True() : new False();
    and.right.type = BooleanType.instance;

    expressionSimplificationTester(
        and,
        firstIsTrue && secondIsTrue ? True.class : False.class,
        BooleanType.instance,
        0,
        false);
  }