| Index: tests/isolate/src/TestFramework.dart
|
| diff --git a/tests/isolate/src/TestFramework.dart b/tests/isolate/src/TestFramework.dart
|
| index 405a1e8cdee52a10d0d5ec093260a5b53d920d91..e15cda2052eb8dc6fc2850b619a8dc24dd8c8486 100644
|
| --- a/tests/isolate/src/TestFramework.dart
|
| +++ b/tests/isolate/src/TestFramework.dart
|
| @@ -173,12 +173,7 @@ class TestExpectation {
|
| testCase.tearDown();
|
| }
|
|
|
| - Future completes(var future) {
|
| - if (!(future is Promise || future is Future)) {
|
| - // TODO(mattsh) - remove this hack once we finish conversion of
|
| - // Promise to Future
|
| - throw "must pass Promise or Future to TestFramework.completes";
|
| - }
|
| + Future completes(Future future) {
|
| Completer completer = new Completer();
|
| future.then(runs1((value) {
|
| completer.complete(value);
|
| @@ -186,15 +181,6 @@ class TestExpectation {
|
| return completer.future;
|
| }
|
|
|
| - Promise completesWithValue(Promise promise, var expected) {
|
| - Promise promiseResult = new TestPromise(this);
|
| - promise.then((value) {
|
| - Expect.equals(expected, value);
|
| - promiseResult.complete(value);
|
| - });
|
| - return promiseResult;
|
| - }
|
| -
|
| Function runs0(Function fn) {
|
| bool ran = false; // We only check that the function is executed once.
|
| pendingCallbacks++;
|
| @@ -286,18 +272,3 @@ class AsynchronousTestCase extends TestCase {
|
| static ReceivePort keepalive = null;
|
|
|
| }
|
| -
|
| -// TODO(mattsh) - remove this once we have migrated the rpc system
|
| -class TestPromise<T> extends PromiseImpl<T> {
|
| -
|
| - TestPromise(this.expect) : super();
|
| -
|
| - void addCompleteHandler(void completeHandler(T result)) {
|
| - super.addCompleteHandler(expect.runs1((T result) {
|
| - completeHandler(result);
|
| - }));
|
| - }
|
| -
|
| - final TestExpectation expect;
|
| -
|
| -}
|
|
|