| Index: tests/isolate/src/SpawnTest.dart
|
| diff --git a/tests/isolate/src/SpawnTest.dart b/tests/isolate/src/SpawnTest.dart
|
| index 43c3953ee01535aa4984a06ee5b97021b1f4f3ec..6194312a0b8eeb20551805c88afd5cb0ba719a68 100644
|
| --- a/tests/isolate/src/SpawnTest.dart
|
| +++ b/tests/isolate/src/SpawnTest.dart
|
| @@ -4,15 +4,14 @@
|
|
|
| #library("SpawnTest");
|
| #import("dart:isolate");
|
| -#import('../../../lib/unittest/unittest.dart');
|
| +#import("TestFramework.dart");
|
|
|
| -main() {
|
| - test("spawn a new isolate", () {
|
| - SpawnedIsolate isolate = new SpawnedIsolate();
|
| - isolate.spawn().then(expectAsync1((SendPort port) {
|
| - port.call(42).then(expectAsync1((message) {
|
| - Expect.equals(42, message);
|
| - }));
|
| +void test(TestExpectation expect) {
|
| + SpawnedIsolate isolate = new SpawnedIsolate();
|
| + expect.completes(isolate.spawn()).then((SendPort port) {
|
| + port.call(42).then(expect.runs1((message) {
|
| + Expect.equals(42, message);
|
| + expect.succeeded();
|
| }));
|
| });
|
| }
|
| @@ -30,3 +29,7 @@ class SpawnedIsolate extends Isolate {
|
| }
|
|
|
| }
|
| +
|
| +main() {
|
| + runTests([test]);
|
| +}
|
|
|