Search in sources :

Example 1 with DoubleLiteral

use of io.crate.sql.tree.DoubleLiteral in project crate by crate.

the class TestSqlParser method testDouble.

@Test
public void testDouble() throws Exception {
    assertExpression("123.", new DoubleLiteral("123"));
    assertExpression("123.0", new DoubleLiteral("123"));
    assertExpression(".5", new DoubleLiteral(".5"));
    assertExpression("123.5", new DoubleLiteral("123.5"));
    assertExpression("123E7", new DoubleLiteral("123E7"));
    assertExpression("123.E7", new DoubleLiteral("123E7"));
    assertExpression("123.0E7", new DoubleLiteral("123E7"));
    assertExpression("123E+7", new DoubleLiteral("123E7"));
    assertExpression("123E-7", new DoubleLiteral("123E-7"));
    assertExpression("123.456E7", new DoubleLiteral("123.456E7"));
    assertExpression("123.456E+7", new DoubleLiteral("123.456E7"));
    assertExpression("123.456E-7", new DoubleLiteral("123.456E-7"));
    assertExpression(".4E42", new DoubleLiteral(".4E42"));
    assertExpression(".4E+42", new DoubleLiteral(".4E42"));
    assertExpression(".4E-42", new DoubleLiteral(".4E-42"));
}
Also used : DoubleLiteral(io.crate.sql.tree.DoubleLiteral) Test(org.junit.Test)

Aggregations

DoubleLiteral (io.crate.sql.tree.DoubleLiteral)1 Test (org.junit.Test)1