Examples of prettySourceString()


Examples of st.gravel.support.compiler.ast.ByteArrayLiteralNode.prettySourceString()

  @Test
  public void testParseByteArrayHighValues() {
    final ByteArrayLiteralNode _node;
    _node = ((ByteArrayLiteralNode) Parser.factory.source_("#[0 127 128 129 255 0]").parseExpression());
    assertTrue(st.gravel.support.jvm.ObjectExtensions.equals_(_node.factory(), ByteArrayLiteralNode.factory));
    assertEquals((String) "#[0 127 128 129 255 0]", (String) _node.prettySourceString());
    assertTrue(st.gravel.support.jvm.ByteArrayExtensions.equals_(_node.value(), new byte[] { 0, 127, -128, -127, -1, 0 }));
  }

  @Test
  public void testParseCascade() {
View Full Code Here

Examples of st.gravel.support.compiler.ast.CharacterLiteralNode.prettySourceString()

  @Test
  public void testParseChar() {
    final CharacterLiteralNode _node;
    _node = ((CharacterLiteralNode) Parser.factory.source_("$a").parseExpression());
    assertTrue(st.gravel.support.jvm.ObjectExtensions.equals_(_node.factory(), CharacterLiteralNode.factory));
    assertEquals((String) "$a", (String) _node.prettySourceString());
    assertTrue(st.gravel.support.jvm.CharacterExtensions.equals_(_node.value(), 'a'));
  }

  @Test
  public void testParseDouble() {
View Full Code Here

Examples of st.gravel.support.compiler.ast.KeywordMethodNode.prettySourceString()

  @Test
  public void testParseKeywordMethod1() {
    final KeywordMethodNode _node;
    _node = ((KeywordMethodNode) Parser.factory.parseMethod_("foo: arg1 ^bar"));
    assertTrue(st.gravel.support.jvm.ObjectExtensions.equals_(_node.factory(), KeywordMethodNode.factory));
    assertEquals((String) "foo: arg1\n\t^bar", (String) _node.prettySourceString());
  }

  @Test
  public void testParseKeywordMethod2() {
    final KeywordMethodNode _node;
View Full Code Here

Examples of st.gravel.support.compiler.ast.KeywordMethodNode.prettySourceString()

  @Test
  public void testParseKeywordMethod2() {
    final KeywordMethodNode _node;
    _node = ((KeywordMethodNode) Parser.factory.parseMethod_("foo: arg1 bar: arg2 ^bar"));
    assertTrue(st.gravel.support.jvm.ObjectExtensions.equals_(_node.factory(), KeywordMethodNode.factory));
    assertEquals((String) "foo: arg1 bar: arg2\n\t^bar", (String) _node.prettySourceString());
  }

  @Test
  public void testParseLiteralArray() {
    final ArrayLiteralNode _node;
View Full Code Here

Examples of st.gravel.support.compiler.ast.NamespacedVariableNode.prettySourceString()

  @Test
  public void testParseNamespacedVariable() {
    final NamespacedVariableNode _node;
    _node = ((NamespacedVariableNode) Parser.factory.source_(" foo.bar.baz ").parseExpression());
    assertEquals((st.gravel.support.jvm.SmalltalkFactory) NamespacedVariableNode.factory, (st.gravel.support.jvm.SmalltalkFactory) _node.factory());
    assertEquals((String) "foo.bar.baz", (String) _node.prettySourceString());
    assertEquals((String[]) new String[] { "foo", "bar", "baz" }, (String[]) _node.path());
  }

  @Test
  public void testParseNegativeInteger() {
View Full Code Here

Examples of st.gravel.support.compiler.ast.Statement.prettySourceString()

  @Test
  public void testAssignmentExpression() {
    final Statement _node;
    _node = Parser.factory.source_(" foo := 7 ").parseStatement();
    assertTrue(st.gravel.support.jvm.ObjectExtensions.equals_(_node.factory(), AssignmentNode.factory));
    assertEquals((String) "foo := 7", (String) _node.prettySourceString());
  }

  @Test
  public void testAssignmentExpressionInBlock() {
    final Statement _node;
View Full Code Here

Examples of st.gravel.support.compiler.ast.Statement.prettySourceString()

  @Test
  public void testAssignmentExpressionInBlock() {
    final Statement _node;
    _node = Parser.factory.source_("[ foo := 7 ]").parseStatement();
    assertTrue(st.gravel.support.jvm.ObjectExtensions.equals_(_node.factory(), BlockNode.factory));
    assertEquals((String) "[foo := 7]", (String) _node.prettySourceString());
  }

  @Test
  public void testParse2ArgBlockEmpty1() {
    final BlockNode _node;
View Full Code Here

Examples of st.gravel.support.compiler.ast.Statement.prettySourceString()

  @Test
  public void testParse2ArgBlockEmpty2() {
    final Statement _node;
    _node = Parser.factory.source_("[:a :b ]").parseExpression();
    assertTrue(st.gravel.support.jvm.ObjectExtensions.equals_(_node.factory(), BlockNode.factory));
    assertEquals((String) "[:a :b | ]", (String) _node.prettySourceString());
  }

  @Test
  public void testParse2ArgBlockNoTemps() {
    final Statement _node;
View Full Code Here

Examples of st.gravel.support.compiler.ast.Statement.prettySourceString()

  @Test
  public void testParse2ArgBlockNoTemps() {
    final Statement _node;
    _node = Parser.factory.source_("[:a :b  | a foo. b bar]").parseExpression();
    assertTrue(st.gravel.support.jvm.ObjectExtensions.equals_(_node.factory(), BlockNode.factory));
    assertEquals((String) "\n[:a :b | \na foo.\nb bar]", (String) _node.prettySourceString());
  }

  @Test
  public void testParse2ArgBlockNoTempsDotEnd() {
    final Statement _node;
View Full Code Here

Examples of st.gravel.support.compiler.ast.Statement.prettySourceString()

  @Test
  public void testParse2ArgBlockNoTempsDotEnd() {
    final Statement _node;
    _node = Parser.factory.source_("[:a :b  | a foo. b bar.]").parseExpression();
    assertTrue(st.gravel.support.jvm.ObjectExtensions.equals_(_node.factory(), BlockNode.factory));
    assertEquals((String) "\n[:a :b | \na foo.\nb bar]", (String) _node.prettySourceString());
  }

  @Test
  public void testParse2ArgBlockWithTemps() {
    final Statement _node;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.