added comment to failing test case

testRecursiveRuleCallingAlternative_expectCorrectGuard

guard for nested alternatives might not be optimal if the positions that
discriminate in the first alternatives is different from the positions
needed on the next one
This commit is contained in:
overflowerror 2021-12-25 16:41:19 +01:00
parent 428dfb93d0
commit 8fac71dda9

View file

@ -793,6 +793,8 @@ public class HoistingProcessorTest extends AbstractXtextTests {
assertEquals("((" + getSyntaxForKeywordToken("a", 2) + " || " + getSyntaxForKeywordToken("b", 1) + " || ((p0) && (p2))) && (" + getSyntaxForKeywordToken("b", 2) + " || " + getSyntaxForKeywordToken("b", 1) + " || ((p0) && (p3))) && (" + getSyntaxForKeywordToken("a", 1) + " || (p1)))", guard.render()); assertEquals("((" + getSyntaxForKeywordToken("a", 2) + " || " + getSyntaxForKeywordToken("b", 1) + " || ((p0) && (p2))) && (" + getSyntaxForKeywordToken("b", 2) + " || " + getSyntaxForKeywordToken("b", 1) + " || ((p0) && (p3))) && (" + getSyntaxForKeywordToken("a", 1) + " || (p1)))", guard.render());
} }
// currently not able to find optimal solution
// for that we would not to collapse alternatives before constructing guards
@Test @Test
public void testRecursiveRuleCallingAlternative_expectCorrectGuard() throws Exception { public void testRecursiveRuleCallingAlternative_expectCorrectGuard() throws Exception {
// @formatter:off // @formatter:off