Search in sources :

Example 6 with FixedPointLiteralNode

use of st.gravel.support.compiler.ast.FixedPointLiteralNode in project gravel by gravel-st.

the class ParserTest method testParseFixedPoint.

@Test
public void testParseFixedPoint() {
    final FixedPointLiteralNode _node;
    _node = ((FixedPointLiteralNode) Parser.factory.source_("12345.0067s").parseExpression());
    assertEquals((st.gravel.support.jvm.SmalltalkFactory) FixedPointLiteralNode.factory, (st.gravel.support.jvm.SmalltalkFactory) _node.factory());
    assertEquals((String) "12345.0067s", (String) _node.valueString());
}
Also used : FixedPointLiteralNode(st.gravel.support.compiler.ast.FixedPointLiteralNode) Test(org.junit.Test)

Example 7 with FixedPointLiteralNode

use of st.gravel.support.compiler.ast.FixedPointLiteralNode in project gravel by gravel-st.

the class ParserTest method testParseFixedPointNegativeWithExponent.

@Test
public void testParseFixedPointNegativeWithExponent() {
    final FixedPointLiteralNode _node;
    _node = ((FixedPointLiteralNode) Parser.factory.source_("-2.5s2").parseExpression());
    assertEquals((st.gravel.support.jvm.SmalltalkFactory) FixedPointLiteralNode.factory, (st.gravel.support.jvm.SmalltalkFactory) _node.factory());
    assertEquals((String) "-2.5s2", (String) _node.valueString());
}
Also used : FixedPointLiteralNode(st.gravel.support.compiler.ast.FixedPointLiteralNode) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)7 FixedPointLiteralNode (st.gravel.support.compiler.ast.FixedPointLiteralNode)7