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

Unified Diff: tests/isolate/src/IsolateComplexMessagesTest.dart

Issue 10247004: test rename overhaul: step 6 - isolate tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: tests/isolate/src/IsolateComplexMessagesTest.dart
diff --git a/tests/isolate/src/IsolateComplexMessagesTest.dart b/tests/isolate/src/IsolateComplexMessagesTest.dart
deleted file mode 100644
index f19d444ddee064c09556d42fc832c334d4ce7797..0000000000000000000000000000000000000000
--- a/tests/isolate/src/IsolateComplexMessagesTest.dart
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Dart test program for testing isolate communication with
-// complex messages.
-
-#library('IsolateComplexMessagesTest');
-#import('dart:isolate');
-#import('../../../lib/unittest/unittest.dart');
-
-main() {
- test("complex messages are serialized correctly", () {
- new LogIsolate().spawn().then(expectAsync1((SendPort remote) {
-
- remote.send(1, null);
- remote.send("Hello", null);
- remote.send("World", null);
- remote.send(const [null, 1, 2, 3, 4], null);
- remote.send(const [1, 2.0, true, false, 0xffffffffff], null);
- remote.send(const ["Hello", "World", 0xffffffffff], null);
- // Shutdown the LogRunner.
- remote.call(-1).then(expectAsync1((int message) {
- Expect.equals(6, message);
- }));
- }));
- });
-}
-
-
-class LogIsolate extends Isolate {
- LogIsolate() : super() { }
-
- void main() {
- int count = 0;
-
- this.port.receive((var message, SendPort replyTo) {
- if (message == -1) {
- this.port.close();
- replyTo.send(count, null);
- } else {
- switch (count) {
- case 0:
- Expect.equals(1, message);
- break;
- case 1:
- Expect.equals("Hello", message);
- break;
- case 2:
- Expect.equals("World", message);
- break;
- case 3:
- Expect.equals(5, message.length);
- Expect.equals(null, message[0]);
- Expect.equals(1, message[1]);
- Expect.equals(2, message[2]);
- Expect.equals(3, message[3]);
- Expect.equals(4, message[4]);
- break;
- case 4:
- Expect.equals(5, message.length);
- Expect.equals(1, message[0]);
- Expect.equals(2.0, message[1]);
- Expect.equals(true, message[2]);
- Expect.equals(false, message[3]);
- Expect.equals(0xffffffffff, message[4]);
- break;
- case 5:
- Expect.equals(3, message.length);
- Expect.equals("Hello", message[0]);
- Expect.equals("World", message[1]);
- Expect.equals(0xffffffffff, message[2]);
- break;
- }
- count++;
- }
- });
- }
-}

Powered by Google App Engine
This is Rietveld 408576698