Chromium Code Reviews| Index: tests/isolate/ping_test.dart |
| diff --git a/tests/isolate/ping_test.dart b/tests/isolate/ping_test.dart |
| index 018eb0d0ca070e178aa5a4571fd19ca6f7a09070..fe564fe61469a2c17888cc24a5f06582e85f4472 100644 |
| --- a/tests/isolate/ping_test.dart |
| +++ b/tests/isolate/ping_test.dart |
| @@ -26,20 +26,24 @@ void main(){ |
| reply.handler = (v) { |
| result.add(v); |
| if (v == 0) { |
| + print(result); |
|
Søren Gjesse
2014/03/21 10:43:45
Debug print
|
| Expect.listEquals(["alive", "control", "event"], |
| - result.where((x) => x is String).toList()); |
| + result.where((x) => x is String).toList(), |
| + "control events"); |
| Expect.listEquals([4, 3, 2, 1, 0], |
| - result.where((x) => x is int).toList()); |
| - Expect.isTrue(result.indexOf("alive") < result.indexOf(3)); |
| - Expect.isTrue(result.indexOf("control") < result.indexOf(2)); |
| + result.where((x) => x is int).toList(), |
| + "data events"); |
| + Expect.isTrue(result.indexOf("alive") < result.indexOf(3), |
| + "alive index < 3"); |
| + Expect.isTrue(result.indexOf("control") < result.indexOf(2), |
| + "control index < 2"); |
| int eventIndex = result.indexOf("event"); |
| - Expect.isTrue(eventIndex > result.indexOf(2)); |
| - Expect.isTrue(eventIndex < result.indexOf(1)); |
| + Expect.isTrue(eventIndex > result.indexOf(2), "event index > 2"); |
| + Expect.isTrue(eventIndex < result.indexOf(1), "event index < 1"); |
| reply.close(); |
| asyncEnd(); |
| } |
| }; |
| - echoPort.send(4); |
| SendPort createPingPort(message) { |
| var pingPort = new RawReceivePort(); |
| pingPort.handler = (_) { |
| @@ -48,6 +52,7 @@ void main(){ |
| }; |
| return pingPort.sendPort; |
| } |
| + echoPort.send(4); |
| isolate.ping(createPingPort("alive"), Isolate.IMMEDIATE); |
| echoPort.send(3); |
| isolate.ping(createPingPort("control"), Isolate.BEFORE_NEXT_EVENT); |