Package org.lilystudio.smarty4j.expression

Examples of org.lilystudio.smarty4j.expression.TranslateString


  }

  @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(
        new TranslateString(node)))), "null");
    Assert.assertEquals(merge(new PrintStatement(node)), "null");
  }
View Full Code Here


          expression = new TranslateDouble(expression);
        }
        break;
      case STROBJECT:
        if (!(expression instanceof StringExpression)) {
          expression = new TranslateString(expression);
        }
        break;
      }
      return expression;
    }
View Full Code Here

TOP

Related Classes of org.lilystudio.smarty4j.expression.TranslateString

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.