OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library unittest.vm_listener; | 5 library unittest.runner.vm_listener; |
6 | 6 |
7 import 'dart:isolate'; | 7 import 'dart:isolate'; |
8 import 'dart:async'; | 8 import 'dart:async'; |
9 | 9 |
10 import 'declarer.dart'; | 10 import '../backend/declarer.dart'; |
11 import 'remote_exception.dart'; | 11 import '../backend/suite.dart'; |
12 import 'suite.dart'; | 12 import '../backend/test.dart'; |
13 import 'test.dart'; | 13 import '../util/remote_exception.dart'; |
14 import 'utils.dart'; | 14 import '../utils.dart'; |
15 | 15 |
16 /// A class that runs tests in a separate isolate and communicates the results | 16 /// A class that runs tests in a separate isolate and communicates the results |
17 /// back to the main isolate. | 17 /// back to the main isolate. |
18 class VmListener { | 18 class VmListener { |
19 /// The test suite to run. | 19 /// The test suite to run. |
20 final Suite _suite; | 20 final Suite _suite; |
21 | 21 |
22 /// Extracts metadata about all the tests in the function returned by | 22 /// Extracts metadata about all the tests in the function returned by |
23 /// [getMain] and sends information about them over [sendPort]. | 23 /// [getMain] and sends information about them over [sendPort]. |
24 /// | 24 /// |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 sendPort.send({ | 106 sendPort.send({ |
107 "type": "error", | 107 "type": "error", |
108 "error": RemoteException.serialize( | 108 "error": RemoteException.serialize( |
109 asyncError.error, asyncError.stackTrace) | 109 asyncError.error, asyncError.stackTrace) |
110 }); | 110 }); |
111 }); | 111 }); |
112 | 112 |
113 liveTest.run().then((_) => sendPort.send({"type": "complete"})); | 113 liveTest.run().then((_) => sendPort.send({"type": "complete"})); |
114 } | 114 } |
115 } | 115 } |
OLD | NEW |