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

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

Issue 10836241: Move unittest from lib to pkg. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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/count_test.dart ('k') | tests/isolate/isolate3_negative_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 // Dart test program for testing that isolates can communicate to isolates 5 // Dart test program for testing that isolates can communicate to isolates
6 // other than the main isolate. 6 // other than the main isolate.
7 7
8 #library('CrossIsolateMessageTest'); 8 #library('CrossIsolateMessageTest');
9 #import('dart:isolate'); 9 #import('dart:isolate');
10 #import('../../lib/unittest/unittest.dart'); 10 #import('../../pkg/unittest/unittest.dart');
11 11
12 void crossIsolate1() { 12 void crossIsolate1() {
13 port.receive((msg, replyTo) { 13 port.receive((msg, replyTo) {
14 SendPort otherIsolate = msg; 14 SendPort otherIsolate = msg;
15 ReceivePort receivePort = new ReceivePort(); 15 ReceivePort receivePort = new ReceivePort();
16 receivePort.receive((msg, replyTo) { 16 receivePort.receive((msg, replyTo) {
17 otherIsolate.send(msg + 58, null); // 100. 17 otherIsolate.send(msg + 58, null); // 100.
18 receivePort.close(); 18 receivePort.close();
19 }); 19 });
20 replyTo.send(['ready', receivePort.toSendPort()]); 20 replyTo.send(['ready', receivePort.toSendPort()]);
(...skipping 29 matching lines...) Expand all
50 Expect.equals("ready", msg[0]); 50 Expect.equals("ready", msg[0]);
51 myPort.receive(expectAsync2((msg, replyTo) { 51 myPort.receive(expectAsync2((msg, replyTo) {
52 Expect.equals(499, msg); 52 Expect.equals(499, msg);
53 myPort.close(); 53 myPort.close();
54 })); 54 }));
55 msg[1].send(42, null); 55 msg[1].send(42, null);
56 })); 56 }));
57 })); 57 }));
58 }); 58 });
59 } 59 }
OLDNEW
« no previous file with comments | « tests/isolate/count_test.dart ('k') | tests/isolate/isolate3_negative_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698