use of org.eclipse.xtext.TerminalRule in project xtext-core by eclipse.
the class XtextSerializerTest method testFQNInSuper_02.
@Ignore("Serialization does not have the correct context information")
@Test
public void testFQNInSuper_02() {
Grammar grammar = load(URI.createURI("classpath:/org/eclipse/xtext/grammarinheritance/InheritanceTestLanguage.xtext"));
AbstractRule rule = GrammarUtil.findRuleForName(grammar, "FQN");
Assert.assertNotNull(rule);
Group group = (Group) rule.getAlternatives();
RuleCall ruleCall = (RuleCall) group.getElements().get(0);
TerminalRule id = (TerminalRule) ruleCall.getRule();
Assert.assertSame(grammar, GrammarUtil.getGrammar(id));
String string = get(ISerializer.class).serialize(rule.getAlternatives());
Assert.assertEquals("ID (\".\" ID)*", string);
// currently wrong result is
Assert.assertEquals("super::ID (\".\" super::ID)*", string);
}
Aggregations