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

Side by Side Diff: tests/isolate/unresolved_ports_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/static_function_test.dart ('k') | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 // spawns multiple isolates and sends unresolved ports between them. 5 // spawns multiple isolates and sends unresolved ports between them.
6 library unresolved_ports; 6 library unresolved_ports;
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:isolate'; 8 import 'dart:isolate';
9 import '../../pkg/unittest/lib/unittest.dart'; 9 import 'package:unittest/unittest.dart';
10 import "remote_unittest_helper.dart";
10 11
11 // This test does the following: 12 // This test does the following:
12 // - main spawns two isolates: 'tim' and 'beth' 13 // - main spawns two isolates: 'tim' and 'beth'
13 // - 'tim' spawns an isolate: 'bob' 14 // - 'tim' spawns an isolate: 'bob'
14 // - main starts a message chain: 15 // - main starts a message chain:
15 // main -> beth -> tim -> bob -> main 16 // main -> beth -> tim -> bob -> main
16 // by giving 'beth' a send-port to 'tim'. 17 // by giving 'beth' a send-port to 'tim'.
17 18
18 bethIsolate(init) { 19 bethIsolate(init) {
19 ReceivePort port = initIsolate(init); 20 ReceivePort port = initIsolate(init);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 spawnFunction(timIsolate).then((tim) { 66 spawnFunction(timIsolate).then((tim) {
66 spawnFunction(bethIsolate).then((beth) { 67 spawnFunction(bethIsolate).then((beth) {
67 beth.send(['main says: Beth, find out if Tim is coming.', 68 beth.send(['main says: Beth, find out if Tim is coming.',
68 tim, port.sendPort]); 69 tim, port.sendPort]);
69 }); 70 });
70 }); 71 });
71 72
72 }); 73 });
73 } 74 }
74 75
75 main() => baseTest(); 76 void main([args, port]) {
77 if (testRemote(main, port)) return;
78 baseTest();
79 }
OLDNEW
« no previous file with comments | « tests/isolate/static_function_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698