Package org.hisrc.jscm.codemodel.literal

Examples of org.hisrc.jscm.codemodel.literal.JSDecimalNonIntegerLiteral


  private final JSCodeModel codeModel = new CodeModelImpl();

  @Test
  public void decimal() {
    JSDecimalNonIntegerLiteral decimal = codeModel.decimal("1.1");
    Assert.assertEquals(1.1, decimal.asDouble(), 0.00001);
    Assert.assertEquals(1.1, decimal.asDecimal().doubleValue(), 0.00001);
    Assert.assertEquals(1.1, decimal.asNumber().doubleValue(), 0.00001);
    Assert.assertEquals(1, decimal.asNumber().intValue());

  }
View Full Code Here

TOP

Related Classes of org.hisrc.jscm.codemodel.literal.JSDecimalNonIntegerLiteral

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.