Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: tests/vm/dart/isolate_unhandled_exception_test2.dart

Issue 11596002: Changed the test a bit to ensure dart:io is not included as dartium cannot import dart:io (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/vm/dart/isolate_unhandled_exception_test2.dart
===================================================================
--- tests/vm/dart/isolate_unhandled_exception_test2.dart (revision 16197)
+++ tests/vm/dart/isolate_unhandled_exception_test2.dart (working copy)
@@ -5,7 +5,6 @@
library isolate_unhandled_exception_test2;
import 'dart:isolate';
-import 'dart:io';
// Tests that an isolate's keeps message handling working after
// throwing an unhandled exception, if there is a top level callback
@@ -19,6 +18,7 @@
void entry() {
port.receive((message, replyTo) {
if (message == 'throw exception') {
+ replyTo.call('throwing exception');
throw new RuntimeError('ignore this exception');
}
replyTo.call('hello');
@@ -37,20 +37,13 @@
Future f = isolate_port.call('throw exception');
f.onComplete((future) {
// Exception wasn't ignored as it was supposed to be.
- print('failed handling exception');
- exit(1);
+ Expect.equals(null, future.exception);
});
// Verify that isolate can still handle messages.
isolate_port.call('hi').onComplete((future) {
- if (future.exception != null) {
- print('unhandled exception: ${future.exception}');
- exit(1);
- }
- if (future.value != 'hello') {
- print('unexpected response: ${future.value}');
- exit(1);
- }
- exit(0);
+ Expect.equals(null, future.exception);
+ Expect.equals('hello', future.value);
});
+
}
« no previous file with comments | « tests/vm/dart/isolate_unhandled_exception_test.dart ('k') | tests/vm/dart/isolate_unhandled_exception_uri_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698