| 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 merging streams. | 5 // Test merging streams. |
| 6 library merge_stream_test; |
| 7 |
| 6 import "dart:async"; | 8 import "dart:async"; |
| 7 import '../../../pkg/unittest/lib/unittest.dart'; | 9 import '../../../pkg/unittest/lib/unittest.dart'; |
| 8 import 'event_helper.dart'; | 10 import 'event_helper.dart'; |
| 9 | 11 |
| 10 testSupercedeStream() { | 12 testSupercedeStream() { |
| 11 { // Simple case of superceding lower priority streams. | 13 { // Simple case of superceding lower priority streams. |
| 12 StreamController s1 = new StreamController(); | 14 StreamController s1 = new StreamController(); |
| 13 StreamController s2 = new StreamController(); | 15 StreamController s2 = new StreamController(); |
| 14 StreamController s3 = new StreamController(); | 16 StreamController s3 = new StreamController(); |
| 15 Stream merge = new Stream.superceding([s1.stream, s2.stream, s3.stream]); | 17 Stream merge = new Stream.superceding([s1.stream, s2.stream, s3.stream]); |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 actual.onDone(expectAsync0(() { | 165 actual.onDone(expectAsync0(() { |
| 164 Expect.listEquals(expected.events, actual.events); | 166 Expect.listEquals(expected.events, actual.events); |
| 165 })); | 167 })); |
| 166 }); | 168 }); |
| 167 } | 169 } |
| 168 | 170 |
| 169 main() { | 171 main() { |
| 170 testSupercedeStream(); | 172 testSupercedeStream(); |
| 171 testCyclicStream(); | 173 testCyclicStream(); |
| 172 } | 174 } |
| OLD | NEW |