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

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

Issue 836313002: Remove dependencies on reportFatalError from tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 5 years, 11 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 | « dart/tests/compiler/dart2js/exit_code_test.dart ('k') | dart/tests/compiler/dart2js/resolver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tests/compiler/dart2js/mock_compiler.dart
diff --git a/dart/tests/compiler/dart2js/mock_compiler.dart b/dart/tests/compiler/dart2js/mock_compiler.dart
index 7fdad36a504f0fc57b83210f42ef3be7f30277f9..aa39101662e0a9ae64f954f0dd8f784b63e3ad4b 100644
--- a/dart/tests/compiler/dart2js/mock_compiler.dart
+++ b/dart/tests/compiler/dart2js/mock_compiler.dart
@@ -163,12 +163,6 @@ class MockCompiler extends Compiler {
api.Diagnostic.WARNING);
}
- void reportFatalError(Spannable node,
- MessageKind messageKind,
- [Map arguments = const {}]) {
- reportError(node, messageKind, arguments);
- }
-
void reportDiagnostic(Spannable node,
Message message,
api.Diagnostic kind) {
@@ -218,7 +212,14 @@ class MockCompiler extends Compiler {
if (visitor.scope is LibraryScope) {
visitor.scope = new MethodScope(visitor.scope, element);
}
- visitor.visit(tree);
+ try {
+ visitor.visit(tree);
+ } on CompilerCancelledException catch (_) {
+ // Ignored.
+
+ // TODO(ahe): Don't ignore CompilerCancelledException, instead, fix
+ // pkg/compiler/lib/src/resolution/members.dart.
+ }
visitor.scope = new LibraryScope(element.library);
return visitor.registry.mapping;
}
« no previous file with comments | « dart/tests/compiler/dart2js/exit_code_test.dart ('k') | dart/tests/compiler/dart2js/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698