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

Side by Side Diff: tests/isolate/stacktrace_message_test.dart

Issue 70103014: Make isolate tests work on drt (and hopefully dartium). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Retain isolate_stress_test in status file Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/isolate/spawn_function_test.dart ('k') | tests/isolate/static_function_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:isolate'; 5 import 'dart:isolate';
6 import "package:unittest/unittest.dart";
7 import "remote_unittest_helper.dart";
6 8
7 main() { 9 void main([args, port]) {
8 ReceivePort reply = new ReceivePort(); 10 if (testRemote(main, port)) return;
9 Isolate.spawn(runTest, reply.sendPort); 11 test("stacktrace_message", () {
10 reply.first.then((StackTrace stack) { 12 ReceivePort reply = new ReceivePort();
11 print(stack); 13 Isolate.spawn(runTest, reply.sendPort);
14 reply.first.then(expectAsync1((StackTrace stack) {
15 print(stack);
16 }));
12 }); 17 });
13 } 18 }
14 19
15 runTest(SendPort sendport) { 20 runTest(SendPort sendport) {
16 try { 21 try {
17 throw 'sorry'; 22 throw 'sorry';
18 } catch (e, stack) { 23 } catch (e, stack) {
19 try { 24 try {
20 sendport.send(stack); 25 sendport.send(stack);
21 print("Stacktrace sent"); 26 print("Stacktrace sent");
22 } catch (e) { 27 } catch (e) {
23 print("Stacktrace not sent"); 28 print("Stacktrace not sent");
24 sendport.send(null); 29 sendport.send(null);
25 } 30 }
26 } 31 }
27 } 32 }
OLDNEW
« no previous file with comments | « tests/isolate/spawn_function_test.dart ('k') | tests/isolate/static_function_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698