use of st.gravel.support.compiler.ast.IntegerLiteralNode in project gravel by gravel-st.
the class ParserTest method testParseNegativeInteger.
@Test
public void testParseNegativeInteger() {
final IntegerLiteralNode _node;
_node = ((IntegerLiteralNode) Parser.factory.source_("-123").parseExpression());
assertEquals((st.gravel.support.jvm.SmalltalkFactory) IntegerLiteralNode.factory, (st.gravel.support.jvm.SmalltalkFactory) _node.factory());
assertEquals(-123, (int) _node.value());
}
use of st.gravel.support.compiler.ast.IntegerLiteralNode in project gravel by gravel-st.
the class ParserTest method testParseIntegerSpace.
@Test
public void testParseIntegerSpace() {
final IntegerLiteralNode _node;
_node = ((IntegerLiteralNode) Parser.factory.source_("123 ").parseExpression());
assertEquals((st.gravel.support.jvm.SmalltalkFactory) IntegerLiteralNode.factory, (st.gravel.support.jvm.SmalltalkFactory) _node.factory());
assertEquals(123, (int) _node.value());
}
use of st.gravel.support.compiler.ast.IntegerLiteralNode in project gravel by gravel-st.
the class ParserTest method testParseInteger.
@Test
public void testParseInteger() {
final IntegerLiteralNode _node;
_node = ((IntegerLiteralNode) Parser.factory.source_("123").parseExpression());
assertEquals((st.gravel.support.jvm.SmalltalkFactory) IntegerLiteralNode.factory, (st.gravel.support.jvm.SmalltalkFactory) _node.factory());
assertEquals(123, (int) _node.value());
}
use of st.gravel.support.compiler.ast.IntegerLiteralNode in project gravel by gravel-st.
the class ParserTest method testParseHexInteger.
@Test
public void testParseHexInteger() {
final IntegerLiteralNode _node;
_node = ((IntegerLiteralNode) Parser.factory.source_("16rFF").parseExpression());
assertEquals((st.gravel.support.jvm.SmalltalkFactory) IntegerLiteralNode.factory, (st.gravel.support.jvm.SmalltalkFactory) _node.factory());
assertEquals(255, (int) _node.value());
}
Aggregations