diff --git a/runtime-testsuite/test/org/antlr/v4/test/runtime/csharp/BaseTest.java b/runtime-testsuite/test/org/antlr/v4/test/runtime/csharp/BaseTest.java index 4d2b02377..38f2e5399 100644 --- a/runtime-testsuite/test/org/antlr/v4/test/runtime/csharp/BaseTest.java +++ b/runtime-testsuite/test/org/antlr/v4/test/runtime/csharp/BaseTest.java @@ -289,7 +289,10 @@ public abstract class BaseTest { writeFile(tmpdir, "input", input); writeLexerTestFile(lexerName, showDFA); addSourceFiles("Test.cs"); - compile(); + if(!compile()) { + System.err.println("Failed to compile!"); + return stderrDuringParse; + } String output = execTest(); if ( stderrDuringParse!=null && stderrDuringParse.length()>0 ) { System.err.println(stderrDuringParse);