Package org.lilystudio.smarty4j.expression.check

Examples of org.lilystudio.smarty4j.expression.check.TranslateCheck


  @Test
  public void testNullExpression() throws Exception {
    ObjectExpression node = new NullExpression();
    Assert.assertEquals(merge(new PrintStatement(new TranslateString(
        new TranslateCheck(node)))), "false");
    Assert.assertEquals(merge(new PrintStatement(new TranslateString(
        new TranslateInteger(node)))), "0");
    Assert.assertEquals(merge(new PrintStatement(new TranslateString(
        new TranslateDouble(node)))), "0.0");
    Assert.assertEquals(merge(new PrintStatement(new TranslateString(
View Full Code Here


        break;
      case OBJECT:
        break;
      case BOOLOBJECT:
        if (!(expression instanceof CheckExpression)) {
          expression = new TranslateCheck(expression);
        }
        break;
      case INTOBJECT:
        if (!(expression instanceof IntegerExpression)) {
          expression = new TranslateInteger(expression);
View Full Code Here

  }

  @Override
  public void syntax(Template template, Object[] words, int wordSize)
      throws ParseException {
    addBranch(new TranslateCheck(Analyzer.mergeExpression(words, 3, wordSize,
        Operation.FLOAT)));
  }
View Full Code Here

  }

  @Override
  public void syntax(Template template, Object[] words, int wordSize)
      throws ParseException {
    check = new TranslateCheck(Analyzer.mergeExpression(words, 3, wordSize,
        Operation.FLOAT));
  }
View Full Code Here

  }

  @Override
  public void syntax(Template template, Object[] words, int wordSize)
      throws ParseException {
    check = new TranslateCheck(Analyzer.mergeExpression(words, 3, wordSize,
        Operation.FLOAT));
  }
View Full Code Here

TOP

Related Classes of org.lilystudio.smarty4j.expression.check.TranslateCheck

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.