OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 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. |
| 4 |
| 5 import 'package:stream_channel/stream_channel.dart'; |
| 6 |
| 7 import '../../utils.dart'; |
| 8 import '../remote_listener.dart'; |
| 9 |
| 10 /// Returns a channel that will emit a serialized representation of the tests |
| 11 /// defined in [getMain]. |
| 12 /// |
| 13 /// This channel is used to control the tests. Platform plugins should forward |
| 14 /// it to the return value of [PlatformPlugin.loadChannel]. It's guaranteed to |
| 15 /// communicate using only JSON-serializable values. |
| 16 /// |
| 17 /// Any errors thrown within [getMain], synchronously or not, will be forwarded |
| 18 /// to the load test for this suite. Prints will similarly be forwarded to that |
| 19 /// test's print stream. |
| 20 /// |
| 21 /// If [hidePrints] is `true` (the default), calls to `print()` within this |
| 22 /// suite will not be forwarded to the parent zone's print handler. However, the |
| 23 /// caller may want them to be forwarded in (for example) a browser context |
| 24 /// where they'll be visible in the development console. |
| 25 StreamChannel serializeSuite(AsyncFunction getMain(), |
| 26 {bool hidePrints: true}) => |
| 27 RemoteListener.start(getMain, hidePrints: hidePrints); |
OLD | NEW |