/** Test a two-level string */ @Test public void testTwoLevelCase() { try { SymbolNode list = testee.parse("(A (B B))"); assertEquals(list.toString(), "(A (B B))"); list = testee.parse("(time (now 2.h18))"); assertEquals(list.toString(), "(time (now 2.h18))"); } catch (IllegalSymbolInputException isie) { fail("No exception expected here"); } }
/** Test a string with mixed levels */ @Test public void testMixedLevelCases() { try { SymbolNode list = testee.parse("(A (B B (C (D) C) B) A A)"); assertEquals(list.toString(), "(A (B B (C (D) C) B) A A)"); list = testee.parse("(A (B B) (C C C))"); assertEquals(list.toString(), "(A (B B) (C C C))"); } catch (IllegalSymbolInputException isie) { fail("No exception expected here"); } }
/** Test a basic on-level string */ @Test public void testSimpleCase() { try { SymbolNode list = testee.parse("(A A)"); assertEquals(list.toString(), "(A A)"); } catch (IllegalSymbolInputException isie) { fail("No exception expected here"); } }