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/dart@21515 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
@@ -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));
|
||||
completion(equals(['value'])));
|
||||
});
|
||||
|
||||
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));
|
||||
});
|
||||
|
||||
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', () {
|
||||
|
||||
Reference in New Issue
Block a user