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

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

Issue 1071853002: Improve error handling of JS-calls (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix checked mode Created 5 years, 8 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 | « pkg/compiler/lib/src/native/behavior.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/js_spec_string_test.dart
diff --git a/tests/compiler/dart2js/js_spec_string_test.dart b/tests/compiler/dart2js/js_spec_string_test.dart
index 9670b415c60a837da965e61edc5872fa7e8cc639..876c87ce9b0a362be3252a6e87d1fb51476ac24f 100644
--- a/tests/compiler/dart2js/js_spec_string_test.dart
+++ b/tests/compiler/dart2js/js_spec_string_test.dart
@@ -20,6 +20,10 @@ class Listener implements DiagnosticListener {
errorMessage = message;
throw "error";
}
+ reportError(spannable, kind, arguments) {
+ errorMessage = '$arguments'; // E.g. "{text: Duplicate tag 'new'.}"
+ throw "error";
+ }
noSuchMethod(_) => null;
}
@@ -53,10 +57,10 @@ void test(String specString,
objectType: OBJECT, nullType: NULL);
} catch (e) {
Expect.isTrue(expectError);
- Expect.isNotNull(listener.errorMessage, 'Internal error expected.');
+ Expect.isNotNull(listener.errorMessage, 'Error expected.');
return;
}
- Expect.isNull(listener.errorMessage, 'Unexpected internal error.');
+ Expect.isNull(listener.errorMessage, 'Unexpected error.');
if (returns != null) {
Expect.listEquals(returns, actualReturns, 'Unexpected returns.');
}
« no previous file with comments | « pkg/compiler/lib/src/native/behavior.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698