OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 // Test the basic StreamController and StreamController.broadcast. | 5 // Test the basic StreamController and StreamController.broadcast. |
6 library stream_controller_async_test; | 6 library stream_controller_async_test; |
7 | 7 |
8 import 'dart:async'; | 8 import 'dart:async'; |
9 import 'dart:isolate'; | |
10 import "package:expect/expect.dart"; | 9 import "package:expect/expect.dart"; |
11 import 'package:unittest/unittest.dart'; | 10 import 'package:unittest/unittest.dart'; |
12 import 'event_helper.dart'; | 11 import 'event_helper.dart'; |
13 import 'stream_state_helper.dart'; | 12 import 'stream_state_helper.dart'; |
14 | 13 |
15 void cancelSub(StreamSubscription sub) { sub.cancel(); } | 14 void cancelSub(StreamSubscription sub) { sub.cancel(); } |
16 | 15 |
17 testController() { | 16 testController() { |
18 // Test fold | 17 // Test fold |
19 test("StreamController.fold", () { | 18 test("StreamController.fold", () { |
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 testRethrow(); | 762 testRethrow(); |
764 testBroadcastController(); | 763 testBroadcastController(); |
765 testAsBroadcast(); | 764 testAsBroadcast(); |
766 testSink(sync: true, broadcast: false, asBroadcast: false); | 765 testSink(sync: true, broadcast: false, asBroadcast: false); |
767 testSink(sync: true, broadcast: false, asBroadcast: true); | 766 testSink(sync: true, broadcast: false, asBroadcast: true); |
768 testSink(sync: true, broadcast: true, asBroadcast: false); | 767 testSink(sync: true, broadcast: true, asBroadcast: false); |
769 testSink(sync: false, broadcast: false, asBroadcast: false); | 768 testSink(sync: false, broadcast: false, asBroadcast: false); |
770 testSink(sync: false, broadcast: false, asBroadcast: true); | 769 testSink(sync: false, broadcast: false, asBroadcast: true); |
771 testSink(sync: false, broadcast: true, asBroadcast: false); | 770 testSink(sync: false, broadcast: true, asBroadcast: false); |
772 } | 771 } |
OLD | NEW |