| 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.singleSubscription. | 5 // Test the basic StreamController and StreamController.singleSubscription. |
| 6 library stream_controller_async_test; |
| 7 |
| 6 import 'dart:async'; | 8 import 'dart:async'; |
| 7 import 'dart:isolate'; | 9 import 'dart:isolate'; |
| 8 import '../../../pkg/unittest/lib/unittest.dart'; | 10 import '../../../pkg/unittest/lib/unittest.dart'; |
| 9 import 'event_helper.dart'; | 11 import 'event_helper.dart'; |
| 10 | 12 |
| 11 testController() { | 13 testController() { |
| 12 // Test reduce | 14 // Test reduce |
| 13 test("StreamController.reduce", () { | 15 test("StreamController.reduce", () { |
| 14 StreamController c = new StreamController(); | 16 StreamController c = new StreamController(); |
| 15 c.reduce(0, (a,b) => a + b) | 17 c.reduce(0, (a,b) => a + b) |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 actualEvents.resume(); | 391 actualEvents.resume(); |
| 390 }); | 392 }); |
| 391 } | 393 } |
| 392 | 394 |
| 393 main() { | 395 main() { |
| 394 testController(); | 396 testController(); |
| 395 testSingleController(); | 397 testSingleController(); |
| 396 testExtraMethods(); | 398 testExtraMethods(); |
| 397 testPause(); | 399 testPause(); |
| 398 } | 400 } |
| OLD | NEW |