Package st.gravel.support.compiler.ast

Examples of st.gravel.support.compiler.ast.ByteArrayLiteralNode


    assertEquals((String) "3 bar + 2 + 1 foo", (String) _node.prettySourceString());
  }

  @Test
  public void testParseByteArray() {
    final ByteArrayLiteralNode _node;
    _node = ((ByteArrayLiteralNode) Parser.factory.source_("#[1 2 3]").parseExpression());
    assertTrue(st.gravel.support.jvm.ObjectExtensions.equals_(_node.factory(), ByteArrayLiteralNode.factory));
    assertEquals((String) "#[1 2 3]", (String) _node.prettySourceString());
    assertTrue(st.gravel.support.jvm.ByteArrayExtensions.equals_(_node.value(), new byte[] { 1, 2, 3 }));
  }
View Full Code Here


    assertTrue(st.gravel.support.jvm.ByteArrayExtensions.equals_(_node.value(), new byte[] { 1, 2, 3 }));
  }

  @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 }));
  }
View Full Code Here

TOP

Related Classes of st.gravel.support.compiler.ast.ByteArrayLiteralNode

Copyright © 2018 www.massapicom. 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.