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

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

Issue 247863005: Revert "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 e6f7f8827c8153204f08defedf3f41db687ef94d..aad0c5739eb49cf49f602cee8e777f464ae5d2eb 100644
--- a/tests/compiler/dart2js_extra/deferred/deferred_function_test.dart
+++ b/tests/compiler/dart2js_extra/deferred/deferred_function_test.dart
@@ -14,15 +14,18 @@ import 'dart:async';
const lazy = const DeferredLibrary('deferred_function_library');
-isError(e) => e is Error;
+isNoSuchMethodError(e) => e is NoSuchMethodError;
readFoo() {
+ // TODO(ahe): There is a problem with type inference of deferred
+ // function closures. We think they are never null.
+ if (new DateTime.now().millisecondsSinceEpoch == 87) return null;
return lib.foo;
}
main() {
- Expect.throws(() { lib.foo('a'); }, isError);
- Expect.throws(readFoo, isError);
+ Expect.throws(() { lib.foo('a'); }, isNoSuchMethodError);
+ Expect.throws(readFoo, isNoSuchMethodError);
int counter = 0;
asyncStart();
lazy.load().then((_) {
@@ -42,6 +45,6 @@ main() {
asyncEnd();
});
Expect.equals(0, counter);
- Expect.throws(() { lib.foo('a'); }, isError);
- Expect.throws(readFoo, isError);
+ Expect.throws(() { lib.foo('a'); }, isNoSuchMethodError);
+ Expect.throws(readFoo, isNoSuchMethodError);
}

Powered by Google App Engine
This is Rietveld 408576698