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