Skip to content
Snippets Groups Projects
Commit 0d90db8c authored by floitsch@google.com's avatar floitsch@google.com
Browse files

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
parent 4c330fcf
No related branches found
No related tags found
No related merge requests found
......@@ -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', () {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment