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

Side by Side Diff: tests/isolate/count_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
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 #library("CountTest"); 5 #library("CountTest");
6 #import('dart:isolate'); 6 #import('dart:isolate');
7 #import('../../pkg/unittest/unittest.dart'); 7 #import('../../pkg/unittest/lib/unittest.dart');
8 8
9 void countMessages() { 9 void countMessages() {
10 int count = 0; 10 int count = 0;
11 port.receive((int message, SendPort replyTo) { 11 port.receive((int message, SendPort replyTo) {
12 if (message == -1) { 12 if (message == -1) {
13 Expect.equals(10, count); 13 Expect.equals(10, count);
14 replyTo.send(-1, null); 14 replyTo.send(-1, null);
15 port.close(); 15 port.close();
16 return; 16 return;
17 } 17 }
(...skipping 19 matching lines...) Expand all
37 37
38 Expect.equals((count - 1) * 2, message); 38 Expect.equals((count - 1) * 2, message);
39 remote.send(count++, reply); 39 remote.send(count++, reply);
40 if (count == 10) { 40 if (count == 10) {
41 remote.send(-1, reply); 41 remote.send(-1, reply);
42 } 42 }
43 }, count: 11)); 43 }, count: 11));
44 remote.send(count++, reply); 44 remote.send(count++, reply);
45 }); 45 });
46 } 46 }
OLDNEW
« no previous file with comments | « tests/isolate/compute_this_script_browser_test.dart ('k') | tests/isolate/cross_isolate_message_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698