Index: tests/compiler/dart2js/mock_compiler.dart |
=================================================================== |
--- tests/compiler/dart2js/mock_compiler.dart (revision 22847) |
+++ tests/compiler/dart2js/mock_compiler.dart (working copy) |
@@ -172,7 +172,6 @@ |
class _WorkerBase {}'''; |
class MockCompiler extends Compiler { |
- api.DiagnosticHandler diagnosticHandler; |
List<WarningMessage> warnings; |
List<WarningMessage> errors; |
final Map<String, SourceFile> sourceFiles; |
@@ -256,8 +255,6 @@ |
void reportWarning(Node node, var message) { |
if (message is! Message) message = message.message; |
warnings.add(new WarningMessage(node, message)); |
- reportDiagnostic(spanFromNode(node), |
- 'Warning: $message', api.Diagnostic.WARNING); |
} |
void reportError(Node node, var message) { |
@@ -267,8 +264,6 @@ |
} |
if (message is! Message) message = message.message; |
errors.add(new WarningMessage(node, message)); |
- reportDiagnostic(spanFromNode(node), |
- 'Error: $message', api.Diagnostic.ERROR); |
} |
void reportMessage(SourceSpan span, var message, api.Diagnostic kind) { |
@@ -278,17 +273,10 @@ |
} else { |
warnings.add(diagnostic); |
} |
- reportDiagnostic(span, "$message", kind); |
} |
- void reportDiagnostic(SourceSpan span, String message, api.Diagnostic kind) { |
- if (diagnosticHandler != null) { |
- if (span != null) { |
- diagnosticHandler(span.uri, span.begin, span.end, message, kind); |
- } else { |
- diagnosticHandler(null, null, null, message, kind); |
- } |
- } |
+ void reportDiagnostic(SourceSpan span, String message, var kind) { |
+ print(message); |
} |
bool get compilationFailed => !errors.isEmpty; |
@@ -330,7 +318,7 @@ |
parseScript(String text, [LibraryElement library]) { |
if (library == null) library = mainApp; |
- parseUnit(text, this, library, registerSource); |
+ parseUnit(text, this, library); |
} |
void scanBuiltinLibraries() { |