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

Side by Side Diff: tests/isolate/nested_spawn_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/nested_spawn2_test.dart ('k') | tests/isolate/request_reply_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 spawn other isolates. 5 // Dart test program for testing that isolates can spawn other isolates.
6 6
7 #library('NestedSpawnTest'); 7 #library('NestedSpawnTest');
8 #import("dart:isolate"); 8 #import("dart:isolate");
9 #import('../../lib/unittest/unittest.dart'); 9 #import('../../pkg/unittest/unittest.dart');
10 10
11 void isolateA() { 11 void isolateA() {
12 port.receive((msg, replyTo) { 12 port.receive((msg, replyTo) {
13 Expect.equals("launch nested!", msg); 13 Expect.equals("launch nested!", msg);
14 SendPort p = spawnFunction(isolateB); 14 SendPort p = spawnFunction(isolateB);
15 p.call("alive?").then((msg) { 15 p.call("alive?").then((msg) {
16 Expect.equals("and kicking", msg); 16 Expect.equals("and kicking", msg);
17 replyTo.send(499, null); 17 replyTo.send(499, null);
18 port.close(); 18 port.close();
19 }); 19 });
(...skipping 10 matching lines...) Expand all
30 30
31 31
32 main() { 32 main() {
33 test("spawned isolates can spawn nested isolates", () { 33 test("spawned isolates can spawn nested isolates", () {
34 SendPort port = spawnFunction(isolateA); 34 SendPort port = spawnFunction(isolateA);
35 port.call("launch nested!").then(expectAsync1((msg) { 35 port.call("launch nested!").then(expectAsync1((msg) {
36 Expect.equals(499, msg); 36 Expect.equals(499, msg);
37 })); 37 }));
38 }); 38 });
39 } 39 }
OLDNEW
« no previous file with comments | « tests/isolate/nested_spawn2_test.dart ('k') | tests/isolate/request_reply_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698