From 0d90db8c90cf16bef6b204c008b65234530a9d00 Mon Sep 17 00:00:00 2001
From: "floitsch@google.com" <floitsch@google.com>
Date: Mon, 15 Apr 2013 21:08:09 +0000
Subject: [PATCH] Remove tests that don't work with asBroadcastStreams anymore.

Review URL: https://codereview.chromium.org//14110012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge@21515 260f80e4-7a28-3924-810f-c04153c831b5
---
 test/error_group_test.dart | 35 +++++------------------------------
 1 file changed, 5 insertions(+), 30 deletions(-)

diff --git a/test/error_group_test.dart b/test/error_group_test.dart
index de46d1e2..13f24153 100644
--- a/test/error_group_test.dart
+++ b/test/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', () {
-- 
GitLab