Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Unified Diff: utils/tests/pub/error_group_test.dart

Issue 14110012: Remove tests that don't work with asBroadcastStreams anymore. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/pub/error_group_test.dart
diff --git a/utils/tests/pub/error_group_test.dart b/utils/tests/pub/error_group_test.dart
index de46d1e283646dfd481cf3154488c18fbc20368d..13f24153c91faf905d8e3d0e5e8b48a7bc3ba7c6 100644
--- a/utils/tests/pub/error_group_test.dart
+++ b/utils/tests/pub/error_group_test.dart
@@ -248,43 +248,18 @@ main() {
errorGroup.signalError(new FormatException());
});
- test("should complete .done when the stream is done even if the stream "
- "doesn't have a listener", () {
+ test("should see one value and complete .done when the stream is done even "
+ "if the stream doesn't have a listener", () {
expect(errorGroup.done, completes);
controller.add('value');
controller.close();
- // A listener added afterwards should see an empty stream, since it's not
- // single-subscription
+ // Now that broadcast controllers have been removed a listener should
+ // see the value that has been put into the controller.
expect(errorGroup.done.then((_) => stream.toList()),
- completion(isEmpty));
- });
-
- test("should pipe an exception from the stream to .done if the stream "
- "doesn't have a listener", () {
- expect(errorGroup.done, throwsFormatException);
- controller.addError(new FormatException());
-
- // A listener added afterwards should see an empty stream, since it's not
- // single-subscription
- expect(errorGroup.done.catchError((_) {
- controller.add('value'); // should be ignored
- return stream.toList();
- }), completion(isEmpty));
+ completion(equals(['value'])));
});
- test("should pass a signaled exception to .done if the stream doesn't "
- "have a listener",
- () {
- expect(errorGroup.done, throwsFormatException);
- errorGroup.signalError(new FormatException());
-
- // A listener added afterwards should receive the exception
- expect(errorGroup.done.catchError((_) {
- controller.add('value'); // should be ignored
- return stream.toList();
- }), completion(isEmpty));
- });
});
group('with a single single-subscription stream', () {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698