From e4f312c869138a9b3e6d1cb4393adaf36bbd4af5 Mon Sep 17 00:00:00 2001 From: Larry Li Date: Mon, 20 Jan 2020 23:30:56 +1100 Subject: [PATCH] aot compile large lexer test --- .../test/org/antlr/v4/test/runtime/dart/BaseDartTest.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/runtime-testsuite/test/org/antlr/v4/test/runtime/dart/BaseDartTest.java b/runtime-testsuite/test/org/antlr/v4/test/runtime/dart/BaseDartTest.java index 1361e6bed..75988a7c6 100644 --- a/runtime-testsuite/test/org/antlr/v4/test/runtime/dart/BaseDartTest.java +++ b/runtime-testsuite/test/org/antlr/v4/test/runtime/dart/BaseDartTest.java @@ -26,6 +26,7 @@ import org.antlr.v4.test.runtime.BaseRuntimeTest; import org.antlr.v4.test.runtime.ErrorQueue; import org.antlr.v4.test.runtime.RuntimeTestSupport; import org.antlr.v4.test.runtime.StreamVacuum; +import org.antlr.v4.test.runtime.descriptors.LexerExecDescriptors; import org.antlr.v4.test.runtime.descriptors.PerformanceDescriptors; import org.antlr.v4.tool.*; import org.stringtemplate.v4.ST; @@ -47,7 +48,10 @@ import static org.junit.Assert.assertArrayEquals; public class BaseDartTest implements RuntimeTestSupport { - private static final List AOT_COMPILE_TESTS = Collections.singletonList(new PerformanceDescriptors.DropLoopEntryBranchInLRRule_4().input); + private static final List AOT_COMPILE_TESTS = Arrays.asList( + new PerformanceDescriptors.DropLoopEntryBranchInLRRule_4().input, + new LexerExecDescriptors.LargeLexer().input + ); public static final String newline = System.getProperty("line.separator"); public static final String pathSep = System.getProperty("path.separator"); @@ -383,7 +387,7 @@ public class BaseDartTest implements RuntimeTestSupport { assertTrue(success); writeFile(tmpdir, "input", input); writeLexerTestFile(lexerName, showDFA); - String output = execClass("Test", false); + String output = execClass("Test", AOT_COMPILE_TESTS.contains(input)); return output; }