Index: tests/isolate/src/PromiseBasedTest.dart |
=================================================================== |
--- tests/isolate/src/PromiseBasedTest.dart (revision 427) |
+++ tests/isolate/src/PromiseBasedTest.dart (working copy) |
@@ -12,15 +12,15 @@ |
void main() { |
int seed = 0; |
this.port.receive((var message, SendPort replyTo) { |
- print("Got ${message[0]}"); |
+ //print("Got ${message[0]}"); |
if (seed == 0) { |
seed = message[0]; |
} else { |
Promise<int> response = new Promise<int>(); |
var proxy = new Proxy.forPort(replyTo); |
- print("send to proxy"); |
+ //print("send to proxy"); |
proxy.send([response]); |
- print("sent"); |
+ //print("sent"); |
response.complete(seed + message[0]); |
this.port.close(); |
} |
@@ -34,12 +34,12 @@ |
proxy.send([42]); // Seed the isolate. |
Promise<int> result = new PromiseProxy<int>(proxy.call([87])); |
Promise promise = expect.completes(result).then((int value) { |
- print("expect 1: $value"); |
+ //print("expect 1: $value"); |
Expect.equals(42 + 87, value); |
return 99; |
}); |
expect.completes(promise).then((int value) { |
- print("expect 2: $value"); |
+ //print("expect 2: $value"); |
Expect.equals(99, value); |
expect.succeeded(); |
}); |
@@ -52,20 +52,20 @@ |
Promise<int> result = new Promise<int>(); |
ReceivePort completer = new ReceivePort.singleShot(); |
completer.receive((var msg, SendPort _) { |
- print("test completer"); |
+ //print("test completer"); |
result.complete(msg[0]); |
}); |
sendCompleter.addCompleteHandler((SendPort port) { |
- print("test send"); |
+ //print("test send"); |
port.send([completer.toSendPort()], null); |
}); |
Promise promise = expect.completes(result).then((int value) { |
- print("expect 1: $value"); |
+ //print("expect 1: $value"); |
Expect.equals(42 + 87, value); |
return 99; |
}); |
expect.completes(promise).then((int value) { |
- print("expect 2: $value"); |
+ //print("expect 2: $value"); |
Expect.equals(99, value); |
expect.succeeded(); |
}); |