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

Unified Diff: tests/compiler/dart2js_extra/deferred/deferred_function_test.dart

Issue 232563006: Insert checks before deferred calls and accesses. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
Index: tests/compiler/dart2js_extra/deferred/deferred_function_test.dart
diff --git a/tests/compiler/dart2js_extra/deferred/deferred_function_test.dart b/tests/compiler/dart2js_extra/deferred/deferred_function_test.dart
index 09b27f06dcd506c47a9f2703280cdad9a4120e52..5e2de213b3e5f5bd12f82da68c10901d81550c02 100644
--- a/tests/compiler/dart2js_extra/deferred/deferred_function_test.dart
+++ b/tests/compiler/dart2js_extra/deferred/deferred_function_test.dart
@@ -14,7 +14,7 @@ import 'dart:async';
const lazy = const DeferredLibrary('deferred_function_library');
-isNoSuchMethodError(e) => e is NoSuchMethodError;
+isError(e) => e is Error;
readFoo() {
// TODO(ahe): There is a problem with type inference of deferred
@@ -24,8 +24,8 @@ readFoo() {
}
main() {
- Expect.throws(() { lib.foo('a'); }, isNoSuchMethodError);
- Expect.throws(readFoo, isNoSuchMethodError);
+ Expect.throws(() { lib.foo('a'); }, isError);
+ Expect.throws(readFoo, isError);
int counter = 0;
asyncStart();
lazy.load().then((bool didLoad) {
@@ -47,6 +47,6 @@ main() {
asyncEnd();
});
Expect.equals(0, counter);
- Expect.throws(() { lib.foo('a'); }, isNoSuchMethodError);
- Expect.throws(readFoo, isNoSuchMethodError);
+ Expect.throws(() { lib.foo('a'); }, isError);
+ Expect.throws(readFoo, isError);
}

Powered by Google App Engine
This is Rietveld 408576698