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

Unified Diff: tests/lib/async/stream_transform_test.dart

Issue 218273002: Upgrading tests with unittest deprecations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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
Index: tests/lib/async/stream_transform_test.dart
diff --git a/tests/lib/async/stream_transform_test.dart b/tests/lib/async/stream_transform_test.dart
index 40c480c23bc27ef18e287389be2c2f48e6d96a3d..a543512cd08f6d2318e453a2333839fbf6225dc7 100644
--- a/tests/lib/async/stream_transform_test.dart
+++ b/tests/lib/async/stream_transform_test.dart
@@ -16,7 +16,7 @@ main() {
test("simpleDone", () {
StreamController c = new StreamController(sync: true);
Stream out = c.stream.handleError((x){}).handleError((x){});
- out.listen((v){}, onDone: expectAsync0(() {}));
+ out.listen((v){}, onDone: expectAsync(() {}));
// Should not throw.
c.close();
});
@@ -27,7 +27,7 @@ main() {
Events input = new Events.fromIterable([1, 2, 3, 4, 5, 6, 7]);
Events actual = new Events.capture(
c.stream.map((x) => x * 2).where((x) => x > 5).skip(2).take(2));
- actual.onDone(expectAsync0(() {
+ actual.onDone(expectAsync(() {
Expect.listEquals(expected.events, actual.events);
}));
input.replay(c);
@@ -39,7 +39,7 @@ main() {
Events input = new Events.fromIterable([1, 2, 3, 4, 5, 6, 7]);
Events actual = new Events.capture(
c.stream.map((x) => x * 2).where((x) => x > 5).skip(2).take(2));
- actual.onDone(expectAsync0(() {
+ actual.onDone(expectAsync(() {
Expect.listEquals(expected.events, actual.events);
}));
actual.pause();
@@ -53,7 +53,7 @@ main() {
.transform(new StreamTransformer.fromHandlers(
handleData: (element, sink) { sink.add(element); },
handleDone: (sink) { sink.close(); }))
- .listen(expectAsync1((e) => expect(e, equals("foo"))));
+ .listen(expectAsync((e) => expect(e, equals("foo"))));
controller.add("foo");
// Should not crash.

Powered by Google App Engine
This is Rietveld 408576698