Chromium Code Reviews| Index: tests/isolate/isolate_throws_test.dart |
| diff --git a/tests/isolate/isolate2_negative_test.dart b/tests/isolate/isolate_throws_test.dart |
| similarity index 58% |
| rename from tests/isolate/isolate2_negative_test.dart |
| rename to tests/isolate/isolate_throws_test.dart |
| index fec12d610fb3f8854c01d44cf4e4baf1b752a6b2..40214fefeff0a2c7a25c7136e12df4fe867b0c9d 100644 |
| --- a/tests/isolate/isolate2_negative_test.dart |
| +++ b/tests/isolate/isolate_throws_test.dart |
| @@ -5,18 +5,20 @@ |
| // Dart test program for testing that exceptions in other isolates bring down |
| // the program. |
| -library isolate2_negative_test; |
| import 'dart:isolate'; |
|
kustermann
2013/11/28 09:19:47
Keep imports sorted.
floitsch
2013/11/28 14:35:26
Done.
|
| +import 'dart:async'; |
| import "package:async_helper/async_helper.dart"; |
| -void entry(msg) { |
| - throw "foo"; |
| +void entry(SendPort replyTo) { |
| + throw "foo"; /// 01: runtime error |
| + replyTo.send("done"); |
| } |
| main() { |
| - // We start an asynchronous operation, but since we don't expect to get |
| - // anything back except an exception there is no asyncEnd(). |
| - // If the exception is not thrown this test will timeout. |
| asyncStart(); |
| - Isolate.spawn(entry, null); |
| + ReceivePort rp = new ReceivePort(); |
| + Isolate.spawn(entry, rp.sendPort); |
| + rp.first.then((_) { |
| + asyncEnd(); |
|
kustermann
2013/11/28 09:19:47
For the positive test (i.e. the /none test), you s
floitsch
2013/11/28 14:35:26
Done.
|
| + }); |
| } |