use of org.eclipse.xtext.parser.terminalrules.bug317840TestLanguage.Element in project xtext-core by eclipse.
the class Bug317840Test method testNodeModel_07.
@Test
public void testNodeModel_07() throws Exception {
Element element = getFirstElement("element a.a b.b");
INode node = NodeModelUtils.getNode(element);
assertEquals("element a.a b.b", node.getText());
assertEquals("[(element)[[( )(a)(.)(a)]][[( )(b)(.)(b)]]]", toDebugString(node));
}
use of org.eclipse.xtext.parser.terminalrules.bug317840TestLanguage.Element in project xtext-core by eclipse.
the class Bug317840Test method testSemanticModel_08.
@Test
public void testSemanticModel_08() throws Exception {
Element element = getFirstElement("element a.a b.b c.c");
assertEquals("a.a", element.getFirst().getName());
assertNull(element.getSecond());
assertEquals(1, element.getThird().size());
assertEquals("b.b", element.getThird().get(0).getName());
assertEquals(1, element.getForth().size());
assertEquals("c.c", element.getForth().get(0).getName());
}
Aggregations