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; |