| Index: tests/isolate/exit_at_spawn_test.dart
|
| diff --git a/tests/isolate/exit_at_spawn_test.dart b/tests/isolate/exit_at_spawn_test.dart
|
| index a03b565b0042d774622888561f77c27f9e10ba9d..355c449607ed720188e22978c42c07fa9f29ba95 100644
|
| --- a/tests/isolate/exit_at_spawn_test.dart
|
| +++ b/tests/isolate/exit_at_spawn_test.dart
|
| @@ -9,19 +9,40 @@ import "dart:async";
|
| import "package:async_helper/async_helper.dart";
|
| import "package:expect/expect.dart";
|
|
|
| +// Isolate exiting immediately.
|
| isomain(args) {}
|
|
|
| +// Isolate exiting after running microtasks.
|
| +isomain2(args) {
|
| + scheduleMicrotask((){});
|
| +}
|
| +
|
| +// Isolate exiting after running timers.
|
| +isomain3(args) {
|
| + new Timer(Duration.ZERO, (){});
|
| +}
|
| +
|
| main(){
|
| asyncStart();
|
|
|
| + test(isomain);
|
| + test(isomain2);
|
| + test(isomain3);
|
| +
|
| + asyncEnd();
|
| +}
|
| +
|
| +void test(mainFunction) {
|
| + asyncStart();
|
| +
|
| RawReceivePort exitPort = new RawReceivePort();
|
| exitPort.handler = (message) {
|
| Expect.equals(null, message);
|
| exitPort.close();
|
| asyncEnd();
|
| };
|
| -
|
| - Isolate.spawn(isomain,
|
| +
|
| + Isolate.spawn(mainFunction,
|
| null,
|
| // Setup handler as part of spawn.
|
| errorsAreFatal: false,
|
|
|