| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 stream_state_helper; | 5 library stream_state_helper; |
| 6 | 6 |
| 7 import "../../../pkg/unittest/lib/unittest.dart"; | 7 import "../../../pkg/unittest/lib/unittest.dart"; |
| 8 import "dart:async"; | 8 import "dart:async"; |
| 9 import "dart:collection"; | 9 import "dart:collection"; |
| 10 | 10 |
| (...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 bool _testSubscribe() => true; | 512 bool _testSubscribe() => true; |
| 513 String toString() => "[Subscribed]"; | 513 String toString() => "[Subscribed]"; |
| 514 } | 514 } |
| 515 | 515 |
| 516 class CancelCallbackEvent extends Event { | 516 class CancelCallbackEvent extends Event { |
| 517 CancelCallbackEvent(void action()) : super(action); | 517 CancelCallbackEvent(void action()) : super(action); |
| 518 bool _testCancel() => true; | 518 bool _testCancel() => true; |
| 519 String toString() => "[Cancelled]"; | 519 String toString() => "[Cancelled]"; |
| 520 } | 520 } |
| 521 | 521 |
| 522 class _BroadcastEventCallback extends Event { | |
| 523 Function _action; | |
| 524 _BroadcastEventCallback(); | |
| 525 } | |
| 526 | |
| 527 class BroadcastCancelCallbackEvent extends Event { | 522 class BroadcastCancelCallbackEvent extends Event { |
| 528 BroadcastCancelCallbackEvent(void action(StreamSubscription sub)) | 523 BroadcastCancelCallbackEvent(void action(StreamSubscription sub)) |
| 529 : super.broadcast(action); | 524 : super.broadcast(action); |
| 530 bool _testBroadcastCancel() => true; | 525 bool _testBroadcastCancel() => true; |
| 531 String toString() => "[BroadcastCancel]"; | 526 String toString() => "[BroadcastCancel]"; |
| 532 } | 527 } |
| 533 | 528 |
| 534 class BroadcastListenCallbackEvent extends Event { | 529 class BroadcastListenCallbackEvent extends Event { |
| 535 BroadcastListenCallbackEvent(void action(StreamSubscription sub)) | 530 BroadcastListenCallbackEvent(void action(StreamSubscription sub)) |
| 536 : super.broadcast(action); | 531 : super.broadcast(action); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 } | 580 } |
| 586 | 581 |
| 587 bool _testBroadcastCancel() { | 582 bool _testBroadcastCancel() { |
| 588 _actual = "*[BroadcastCancel]"; | 583 _actual = "*[BroadcastCancel]"; |
| 589 return true; | 584 return true; |
| 590 } | 585 } |
| 591 | 586 |
| 592 /** Returns a representation of the event it was tested against. */ | 587 /** Returns a representation of the event it was tested against. */ |
| 593 String toString() => _actual; | 588 String toString() => _actual; |
| 594 } | 589 } |
| OLD | NEW |