Index: lib/src/runner/isolate_test.dart |
diff --git a/lib/src/runner/isolate_test.dart b/lib/src/runner/isolate_test.dart |
deleted file mode 100644 |
index 7914ca75732b42a4fcf7ee656620515be7bed0a5..0000000000000000000000000000000000000000 |
--- a/lib/src/runner/isolate_test.dart |
+++ /dev/null |
@@ -1,57 +0,0 @@ |
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
-// for details. All rights reserved. Use of this source code is governed by a |
-// BSD-style license that can be found in the LICENSE file. |
- |
-library unittest.runner.isolate_test; |
- |
-import 'dart:isolate'; |
- |
-import '../backend/live_test.dart'; |
-import '../backend/live_test_controller.dart'; |
-import '../backend/state.dart'; |
-import '../backend/suite.dart'; |
-import '../backend/test.dart'; |
-import '../util/remote_exception.dart'; |
- |
-/// A test in another isolate. |
-class IsolateTest implements Test { |
- final String name; |
- |
- /// The port on which to communicate with the remote test. |
- final SendPort _sendPort; |
- |
- IsolateTest(this.name, this._sendPort); |
- |
- /// Loads a single runnable instance of this test. |
- LiveTest load(Suite suite) { |
- var receivePort; |
- var controller; |
- controller = new LiveTestController(suite, this, () { |
- controller.setState(const State(Status.running, Result.success)); |
- |
- receivePort = new ReceivePort(); |
- _sendPort.send({ |
- 'command': 'run', |
- 'reply': receivePort.sendPort |
- }); |
- |
- receivePort.listen((message) { |
- if (message['type'] == 'error') { |
- var asyncError = RemoteException.deserialize(message['error']); |
- controller.addError(asyncError.error, asyncError.stackTrace); |
- } else if (message['type'] == 'state-change') { |
- controller.setState( |
- new State( |
- new Status.parse(message['status']), |
- new Result.parse(message['result']))); |
- } else { |
- assert(message['type'] == 'complete'); |
- controller.completer.complete(); |
- } |
- }); |
- }, onClose: () { |
- if (receivePort != null) receivePort.close(); |
- }); |
- return controller.liveTest; |
- } |
-} |