| 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 // Test the event/callback protocol of the stream implementations. | 5 // Test the event/callback protocol of the stream implementations. |
| 6 library stream_state_test; | 6 library stream_state_test; |
| 7 | 7 |
| 8 import "../../../pkg/unittest/lib/unittest.dart"; | 8 import "../../../pkg/unittest/lib/unittest.dart"; |
| 9 import "stream_state_helper.dart"; | 9 import "stream_state_helper.dart"; |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 ..expectData(42) | 27 ..expectData(42) |
| 28 ..expectDone() | 28 ..expectDone() |
| 29 ..expectBroadcastCancelOpt() | 29 ..expectBroadcastCancelOpt() |
| 30 ..expectCancel(t.terminate); | 30 ..expectCancel(t.terminate); |
| 31 t..listen()..add(42)..close(); | 31 t..listen()..add(42)..close(); |
| 32 }); | 32 }); |
| 33 | 33 |
| 34 test("$p-data-done-sub-sync", () { | 34 test("$p-data-done-sub-sync", () { |
| 35 var t = asBroadcast ? new StreamProtocolTest.asBroadcast(sync: sync) | 35 var t = asBroadcast ? new StreamProtocolTest.asBroadcast(sync: sync) |
| 36 : new StreamProtocolTest(sync: sync); | 36 : new StreamProtocolTest(sync: sync); |
| 37 t.trace = true; | |
| 38 t..expectListen() | 37 t..expectListen() |
| 39 ..expectBroadcastListenOpt() | 38 ..expectBroadcastListenOpt() |
| 40 ..expectData(42) | 39 ..expectData(42) |
| 41 ..expectDone() | 40 ..expectDone() |
| 42 ..expectBroadcastCancelOpt() | 41 ..expectBroadcastCancelOpt() |
| 43 ..expectCancel(t.terminate); | 42 ..expectCancel(t.terminate); |
| 44 t..add(42)..close()..listen(); | 43 t..add(42)..close()..listen(); |
| 45 }); | 44 }); |
| 46 | 45 |
| 47 test("$p-data-done-sub-async", () { | 46 test("$p-data-done-sub-async", () { |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 t..expectPause(); | 118 t..expectPause(); |
| 120 } | 119 } |
| 121 t..expectDone() | 120 t..expectDone() |
| 122 ..expectBroadcastCancelOpt() | 121 ..expectBroadcastCancelOpt() |
| 123 ..expectCancel(t.terminate); | 122 ..expectCancel(t.terminate); |
| 124 t..listen() | 123 t..listen() |
| 125 ..add(42) | 124 ..add(42) |
| 126 ..close(); | 125 ..close(); |
| 127 }); | 126 }); |
| 128 } | 127 } |
| OLD | NEW |