Add MessageCollector#hasErrors, get rid of MessageSeverityCollector
Also fix duplicated wrapping of a message collector into a message severity collector (in CLICompiler and in the beginning of doExecute in K2JVMCompiler/K2JSCompiler)
This commit is contained in:
@@ -33,7 +33,7 @@ import java.io.IOException;
|
||||
|
||||
public abstract class AbstractModuleXmlParserTest extends TestCase {
|
||||
|
||||
protected void doTest(String xmlPath) throws IOException {
|
||||
protected static void doTest(String xmlPath) throws IOException {
|
||||
File txtFile = new File(FileUtil.getNameWithoutExtension(xmlPath) + ".txt");
|
||||
|
||||
ModuleScriptData result = ModuleXmlParser.parseModuleScript(xmlPath, new MessageCollector() {
|
||||
@@ -43,6 +43,11 @@ public abstract class AbstractModuleXmlParserTest extends TestCase {
|
||||
) {
|
||||
throw new AssertionError(MessageRenderer.PLAIN_FULL_PATHS.render(severity, message, location));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasErrors() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
});
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
Reference in New Issue
Block a user