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

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

Issue 10917275: Update unittest to new package layout. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 months 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_uri_vm_test.dart ('k') | tests/isolate/unresolved_ports_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) 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 // negative test to ensure that API_unresolvedPortsTest works. 5 // negative test to ensure that API_unresolvedPortsTest works.
6 #library('unresolved_ports'); 6 #library('unresolved_ports');
7 #import('dart:isolate'); 7 #import('dart:isolate');
8 #import('../../pkg/unittest/unittest.dart'); 8 #import('../../pkg/unittest/lib/unittest.dart');
9 9
10 bethIsolate() { 10 bethIsolate() {
11 port.receive(expectAsync2((msg, reply) => msg[1].send( 11 port.receive(expectAsync2((msg, reply) => msg[1].send(
12 '${msg[0]}\nBeth says: Tim are you coming? And Bob?', reply))); 12 '${msg[0]}\nBeth says: Tim are you coming? And Bob?', reply)));
13 } 13 }
14 14
15 timIsolate() { 15 timIsolate() {
16 SendPort bob = spawnFunction(bobIsolate); 16 SendPort bob = spawnFunction(bobIsolate);
17 port.receive(expectAsync2((msg, reply) => bob.send( 17 port.receive(expectAsync2((msg, reply) => bob.send(
18 '$msg\nTim says: Can you tell "main" that we are all coming?', reply))); 18 '$msg\nTim says: Can you tell "main" that we are all coming?', reply)));
(...skipping 19 matching lines...) Expand all
38 SendPort beth = spawnFunction(bethIsolate); 38 SendPort beth = spawnFunction(bethIsolate);
39 39
40 beth.send( 40 beth.send(
41 // because tim is created asynchronously, here we are sending an 41 // because tim is created asynchronously, here we are sending an
42 // unresolved port: 42 // unresolved port:
43 ['main says: Beth, find out if Tim is coming.', tim], 43 ['main says: Beth, find out if Tim is coming.', tim],
44 port.toSendPort()); 44 port.toSendPort());
45 }); 45 });
46 } 46 }
47 47
OLDNEW
« no previous file with comments | « tests/isolate/spawn_uri_vm_test.dart ('k') | tests/isolate/unresolved_ports_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698