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

Unified Diff: tests/lib/async/stream_state_helper.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_state_helper.dart
diff --git a/tests/lib/async/stream_state_helper.dart b/tests/lib/async/stream_state_helper.dart
index f0727d65527709995fbc5a9ae065c3929a7533a1..0e46d91f2fadcc35bacc6d3064c90bd5122b5139 100644
--- a/tests/lib/async/stream_state_helper.dart
+++ b/tests/lib/async/stream_state_helper.dart
@@ -64,7 +64,7 @@ class StreamProtocolTest {
onListen: _onListen,
onCancel: _onCancel);
_controllerStream = _controller.stream;
- _onComplete = expectAsync0((){
+ _onComplete = expectAsync((){
_onComplete = null; // Being null marks the test as being complete.
});
}
@@ -78,7 +78,7 @@ class StreamProtocolTest {
onResume: _onResume,
onCancel: _onCancel);
_controllerStream = _controller.stream;
- _onComplete = expectAsync0((){
+ _onComplete = expectAsync((){
_onComplete = null; // Being null marks the test as being complete.
});
}
@@ -94,7 +94,7 @@ class StreamProtocolTest {
_controllerStream = _controller.stream.asBroadcastStream(
onListen: _onBroadcastListen,
onCancel: _onBroadcastCancel);
- _onComplete = expectAsync0((){
+ _onComplete = expectAsync((){
_onComplete = null; // Being null marks the test as being complete.
});
}
@@ -373,11 +373,11 @@ class Event {
Function _action;
StackTrace _stackTrace;
Event(void action())
- : _action = (action == null) ? null : expectAsync0(action) {
+ : _action = (action == null) ? null : expectAsync(action) {
try { throw 0; } catch (_, s) { _stackTrace = s; }
}
Event.broadcast(void action(StreamSubscription sub))
- : _action = (action == null) ? null : expectAsync1(action) {
+ : _action = (action == null) ? null : expectAsync(action) {
try { throw 0; } catch (_, s) { _stackTrace = s; }
}

Powered by Google App Engine
This is Rietveld 408576698