| Index: tests/isolate/spawn_function_custom_class_test.dart
|
| diff --git a/tests/isolate/spawn_function_custom_class_test.dart b/tests/isolate/spawn_function_custom_class_test.dart
|
| index 78c3042e536168dfaac67a2cac99ec51c22f2c90..2369899a5357be173b50bcdf4d39e4d2d9eff148 100644
|
| --- a/tests/isolate/spawn_function_custom_class_test.dart
|
| +++ b/tests/isolate/spawn_function_custom_class_test.dart
|
| @@ -18,21 +18,19 @@ class MyClass {
|
| }
|
| }
|
|
|
| -child() {
|
| - port.receive((msg, reply) {
|
| - reply.send('re: ${new MyClass().myFunc(msg)}');
|
| - });
|
| +child(args) {
|
| + var reply = args[1];
|
| + var msg = args[0];
|
| + reply.send('re: ${new MyClass().myFunc(msg)}');
|
| }
|
|
|
| main() {
|
| test('message - reply chain', () {
|
| ReceivePort port = new ReceivePort();
|
| - port.receive((msg, _) {
|
| + port.listen((msg) {
|
| port.close();
|
| expect(msg, equals('re: hi there'));
|
| });
|
| -
|
| - SendPort s = spawnFunction(child);
|
| - s.send('hi', port.toSendPort());
|
| + Isolate.spawn(child, ['hi', port.sendPort]);
|
| });
|
| }
|
|
|