Search in sources :

Example 1 with FixedPointLiteralNode

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

the class ParserTest method testParseFixedPointWithZero.

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

Example 2 with FixedPointLiteralNode

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

the class ParserTest method testParseFixedPointWithZero2.

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

Example 3 with FixedPointLiteralNode

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

the class ParserTest method testParseFixedPointNegativeWithoutExponent.

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

Example 4 with FixedPointLiteralNode

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

the class ParserTest method testParseFixedPointWithoutExponent.

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

Example 5 with FixedPointLiteralNode

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

the class ParserTest method testParseFixedPointWithExponent.

@Test
public void testParseFixedPointWithExponent() {
    final FixedPointLiteralNode _node;
    _node = ((FixedPointLiteralNode) Parser.factory.source_("5.1s2").parseExpression());
    assertEquals((st.gravel.support.jvm.SmalltalkFactory) FixedPointLiteralNode.factory, (st.gravel.support.jvm.SmalltalkFactory) _node.factory());
    assertEquals((String) "5.1s2", (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