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

Side by Side Diff: tests/isolate/isolate_complex_messages_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/isolate.status ('k') | tests/isolate/mandel_isolate_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 isolate communication with 5 // Dart test program for testing isolate communication with
6 // complex messages. 6 // complex messages.
7 7
8 library IsolateComplexMessagesTest; 8 library IsolateComplexMessagesTest;
9 import 'dart:isolate'; 9 import 'dart:isolate';
10 import '../../pkg/unittest/lib/unittest.dart'; 10 import 'package:unittest/unittest.dart';
11 import "remote_unittest_helper.dart";
11 12
12 main() { 13 void main([args, port]) {
14 if (testRemote(main, port)) return;
13 test("complex messages are serialized correctly", () { 15 test("complex messages are serialized correctly", () {
14 ReceivePort local = new ReceivePort(); 16 ReceivePort local = new ReceivePort();
15 Isolate.spawn(logMessages, local.sendPort); 17 Isolate.spawn(logMessages, local.sendPort);
16 var done = expectAsync0((){}); 18 var done = expectAsync0((){});
17 local.listen(expectAsync1((msg) { 19 local.listen(expectAsync1((msg) {
18 switch (msg[0]) { 20 switch (msg[0]) {
19 case "init": 21 case "init":
20 var remote = msg[1]; 22 var remote = msg[1];
21 remote.send(1); 23 remote.send(1);
22 remote.send("Hello"); 24 remote.send("Hello");
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 expect(message.length, 3); 78 expect(message.length, 3);
77 expect(message[0], "Hello"); 79 expect(message[0], "Hello");
78 expect(message[1], "World"); 80 expect(message[1], "World");
79 expect(message[2], 0xffffffffff); 81 expect(message[2], 0xffffffffff);
80 break; 82 break;
81 } 83 }
82 count++; 84 count++;
83 } 85 }
84 }); 86 });
85 } 87 }
OLDNEW
« no previous file with comments | « tests/isolate/isolate.status ('k') | tests/isolate/mandel_isolate_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698