Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(738)

Unified Diff: tests/compiler/dart2js/mock_compiler.dart

Issue 15301003: Revert r22847: some dart2dart tests fail. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/compiler/dart2js/analyze_api_test.dart ('k') | tests/compiler/dart2js/parser_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « tests/compiler/dart2js/analyze_api_test.dart ('k') | tests/compiler/dart2js/parser_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698