| Index: tests/isolate/isolate_negative_test.dart
|
| diff --git a/tests/isolate/isolate_negative_test.dart b/tests/isolate/isolate_negative_test.dart
|
| index d3cb0e6ce6f71239de59630a4228addb605333dc..d324f570d98c418d45f0497a6f86b4ed1b70b6a2 100644
|
| --- a/tests/isolate/isolate_negative_test.dart
|
| +++ b/tests/isolate/isolate_negative_test.dart
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
|
| +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| @@ -8,22 +8,17 @@
|
| #import('dart:isolate');
|
| #import('../../lib/unittest/unittest.dart');
|
|
|
| -class IsolateNegativeTest extends Isolate {
|
| - IsolateNegativeTest() : super();
|
| -
|
| - void main() {
|
| - this.port.receive((ignored, replyTo) {
|
| - replyTo.send("foo", null);
|
| - });
|
| - }
|
| +void entry() {
|
| + port.receive((ignored, replyTo) {
|
| + replyTo.send("foo", null);
|
| + });
|
| }
|
|
|
| main() {
|
| test("ensure isolate code is executed", () {
|
| - new IsolateNegativeTest().spawn().then(expectAsync1((SendPort port) {
|
| - port.call("foo").then(expectAsync1((message) {
|
| - Expect.equals(true, "Expected fail"); // <=-------- Should fail here.
|
| - }));
|
| + SendPort port = spawnFunction(entry);
|
| + port.call("foo").then(expectAsync1((message) {
|
| + Expect.equals(true, "Expected fail"); // <=-------- Should fail here.
|
| }));
|
| });
|
| }
|
|
|