OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 // Dart test program for testing isolate communication with | 4 // Dart test program for testing isolate communication with |
5 // typed objects. | 5 // typed objects. |
6 // VMOptions=--checked | 6 // VMOptions=--checked |
7 | 7 |
8 library TypedMessageTest; | 8 library TypedMessageTest; |
9 import "dart:async"; | 9 import "dart:async"; |
10 import "package:expect/expect.dart"; | 10 import "package:expect/expect.dart"; |
(...skipping 30 matching lines...) Expand all Loading... |
41 iterator.moveNext().then((b) { | 41 iterator.moveNext().then((b) { |
42 SendPort sendPort = iterator.current; | 42 SendPort sendPort = iterator.current; |
43 sendPort.send(msg); | 43 sendPort.send(msg); |
44 return iterator.moveNext(); | 44 return iterator.moveNext(); |
45 }).then((b) { | 45 }).then((b) { |
46 Expect.equals(1, iterator.current); | 46 Expect.equals(1, iterator.current); |
47 receivePort.close(); | 47 receivePort.close(); |
48 asyncEnd(); | 48 asyncEnd(); |
49 }); | 49 }); |
50 } | 50 } |
OLD | NEW |