Package com.ericsson.otp.erlang

Examples of com.ericsson.otp.erlang.OtpErlangString


  public void testToString3()
  {
    Assert.assertEquals("[\'this is an atom\',\"this is a string\"]",
        ErlangLabel.dumpErlangObject(new OtpErlangList(new OtpErlangObject[]{
            new OtpErlangAtom("this is an atom"),
            new OtpErlangString("this is a string")
        })));
  }
View Full Code Here


  public void testToString4()
  {
    Assert.assertEquals("{\'this is an atom\',\"this is a string\"}",
        ErlangLabel.dumpErlangObject(new OtpErlangTuple(new OtpErlangObject[]{
            new OtpErlangAtom("this is an atom"),
            new OtpErlangString("this is a string")
        })));
  }
View Full Code Here

  public void testToString12()
  {
    Assert.assertEquals("{\'this is an atom\',\"this is a string\",[[-234],{}]}",
        ErlangLabel.dumpErlangObject(new OtpErlangTuple(new OtpErlangObject[]{
            new OtpErlangAtom("this is an atom"),
            new OtpErlangString("this is a string"),
            new OtpErlangList(new OtpErlangObject[]{
                new OtpErlangList(new OtpErlangObject[]{
                    new OtpErlangInt(-234)
                }),
                new OtpErlangTuple(new OtpErlangObject[]{
View Full Code Here

  }
 
  public void testParse2c()
  {
    String text = " \"this \\\"is an 'atom\"   ";
    OtpErlangString string = (OtpErlangString)ErlangLabel.parseText(text);
    Assert.assertEquals("this \"is an 'atom",string.stringValue());
    Assert.assertEquals(text.trim(),ErlangLabel.dumpErlangObject(string));
  }
View Full Code Here

  /** Quoted characters. */
  @Test
  public void testParse2d()
  {
    String text = " \"this \\\"is \\'fh an \'atom\"   ";
    OtpErlangString string = (OtpErlangString)ErlangLabel.parseText(text);
    Assert.assertEquals("this \"is 'fh an 'atom",string.stringValue());
    checkResponse(runner, "\"this \\\"is 'fh an \'atom\"",text);
  }
View Full Code Here

  /** Quoted characters. */
  @Test
  public void testParse2e()
  {
    String text = " \"this \\\" is \\' fh an \'atom\"   ";
    OtpErlangString string = (OtpErlangString)ErlangLabel.parseText(text);
    Assert.assertEquals("this \" is ' fh an 'atom",string.stringValue());
    checkResponse(runner, "\"this \\\" is ' fh an 'atom\"",text);
  }
View Full Code Here

  /** Quoted characters. */
  @Test
  public void testParse2f()
  {
    String text = " \"this\\\"i s\\' fh an \'atom\"   ";
    OtpErlangString string = (OtpErlangString)ErlangLabel.parseText(text);
    Assert.assertEquals("this\"i s' fh an \'atom",string.stringValue());
    checkResponse(runner, "\"this\\\"i s' fh an \'atom\"",text);
  }
View Full Code Here

  /** Spaces. */
  @Test
  public void testParse2g()
  {
    String text = " \"  \"   ";
    OtpErlangString string = (OtpErlangString)ErlangLabel.parseText(text);
    Assert.assertEquals("  ",string.stringValue());
    checkResponse(runner, "\"  \"",text);
 
View Full Code Here

  /** Spaces. */
  @Test
  public void testParse2h()
  {
    String text = " \" a \"   ";
    OtpErlangString string = (OtpErlangString)ErlangLabel.parseText(text);
    Assert.assertEquals(" a ",string.stringValue());
    checkResponse(runner, "\" a \"",text);
 
View Full Code Here

  /** Bar 1. */
  @Test
  public void testParse2i()
  {
    String text = " \" | a \"   ";
    OtpErlangString string = (OtpErlangString)ErlangLabel.parseText(text);
    Assert.assertEquals(" | a ",string.stringValue());
    checkResponse(runner, "\" | a \"",text);
 
View Full Code Here

TOP

Related Classes of com.ericsson.otp.erlang.OtpErlangString

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.