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

Unified Diff: tests/isolate/src/TestFramework.dart

Issue 8457005: convert isolates to use Future (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: updated co19 Created 9 years, 1 month 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/isolate/src/Mixed2Test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/isolate/src/TestFramework.dart
diff --git a/tests/isolate/src/TestFramework.dart b/tests/isolate/src/TestFramework.dart
index b2a7f286bed4e6073c58aa654667a3fe6fcb1931..97162ba279790417dcf6750567bf4728d8169d2a 100644
--- a/tests/isolate/src/TestFramework.dart
+++ b/tests/isolate/src/TestFramework.dart
@@ -174,7 +174,13 @@ class TestExpectation {
testCase.tearDown();
}
- Promise completes(Promise promise) {
+ Promise completes(var promise) {
+ if (!(promise is Promise || promise is Future)) {
+ // TODO(mattsh) - remove this hack once we finish conversion of
+ // Promise to Future
+ throw "must pass Promise or Future to TestFramework.completes";
+ }
+
Promise result = new TestPromise(this);
promise.then((value) { result.complete(value); });
return result;
« no previous file with comments | « tests/isolate/src/Mixed2Test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698