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

Unified Diff: tests/isolate/raw_port_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/isolate/raw_port_test.dart
diff --git a/tests/isolate/raw_port_test.dart b/tests/isolate/raw_port_test.dart
index a7cd2fb26403b50e04b5afb57476ff344e268d71..1da1484f03df0815295e5ef84abb20bd3fd60a42 100644
--- a/tests/isolate/raw_port_test.dart
+++ b/tests/isolate/raw_port_test.dart
@@ -25,7 +25,7 @@ main([args, port]) {
test("raw receive", () {
RawReceivePort port = new RawReceivePort();
Isolate.spawn(remote, port.sendPort);
- port.handler = expectAsync1((v) {
+ port.handler = expectAsync((v) {
expect(v, "reply");
port.close();
});
@@ -34,9 +34,9 @@ main([args, port]) {
test("raw receive twice - change handler", () {
RawReceivePort port = new RawReceivePort();
Isolate.spawn(remote2, port.sendPort);
- port.handler = expectAsync1((v) {
+ port.handler = expectAsync((v) {
expect(v, "reply 1");
- port.handler = expectAsync1((v) {
+ port.handler = expectAsync((v) {
expect(v, "reply 2");
port.close();
});
@@ -46,18 +46,18 @@ main([args, port]) {
test("from-raw-port", () {
RawReceivePort rawPort = new RawReceivePort();
Isolate.spawn(remote, rawPort.sendPort);
- rawPort.handler = expectAsync1((v) {
+ rawPort.handler = expectAsync((v) {
expect(v, "reply");
ReceivePort port = new ReceivePort.fromRawReceivePort(rawPort);
Isolate.spawn(remote, rawPort.sendPort);
Isolate.spawn(remote, port.sendPort);
int ctr = 2;
- port.listen(expectAsync1((v) {
+ port.listen(expectAsync((v) {
expect(v, "reply");
ctr--;
if (ctr == 0) port.close();
}, count: 2),
- onDone: expectAsync0((){}));
+ onDone: expectAsync((){}));
});
});
}

Powered by Google App Engine
This is Rietveld 408576698