Search in sources :

Example 1 with String

use of de.prob.translator.types.String in project probparsers by bendisposto.

the class TestTypeAPI method testString.

@Test
public void testString() throws Exception {
    Sequence s = (Sequence) Translator.translate("[\"a\", \"word\", \"a\"]");
    String s1 = (String) s.get(1);
    String s2 = (String) s.get(2);
    String s3 = (String) s.get(3);
    assertEquals(s1, s3);
    assertSame(s1, s1);
    assertFalse(s1.equals(s2));
    assertEquals(4, s2.length());
}
Also used : String(de.prob.translator.types.String) Test(org.junit.Test)

Aggregations

String (de.prob.translator.types.String)1 Test (org.junit.Test)1