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

Unified Diff: tests/corelib/src/PortTest.dart

Issue 9422019: isolates refactor: this change introduces 'dart:isolate' as a library. This is a (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: '' Created 8 years, 10 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
« no previous file with comments | « tests/corelib/src/FuturesTest.dart ('k') | tests/isolate/isolate.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/src/PortTest.dart
diff --git a/tests/corelib/src/PortTest.dart b/tests/corelib/src/PortTest.dart
deleted file mode 100644
index 276df2c95143ea4a9f50c1d423d6ec0c5eb19612..0000000000000000000000000000000000000000
--- a/tests/corelib/src/PortTest.dart
+++ /dev/null
@@ -1,63 +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 properties of ports.
-
-class PortTest {
-
- static void testMain() {
- testHashCode();
- testEquals();
- testMap();
- }
-
- static void testHashCode() {
- ReceivePort rp0 = new ReceivePort();
- ReceivePort rp1 = new ReceivePort();
- Expect.equals(rp0.toSendPort().hashCode(), rp0.toSendPort().hashCode());
- Expect.equals(rp1.toSendPort().hashCode(), rp1.toSendPort().hashCode());
- rp0.close();
- rp1.close();
- }
-
- static void testEquals() {
- ReceivePort rp0 = new ReceivePort();
- ReceivePort rp1 = new ReceivePort();
- Expect.equals(rp0.toSendPort(), rp0.toSendPort());
- Expect.equals(rp1.toSendPort(), rp1.toSendPort());
- Expect.equals(false, (rp0.toSendPort() == rp1.toSendPort()));
- rp0.close();
- rp1.close();
- }
-
- static void testMap() {
- ReceivePort rp0 = new ReceivePort();
- ReceivePort rp1 = new ReceivePort();
- final map = new Map<SendPort, int>();
- map[rp0.toSendPort()] = 42;
- map[rp1.toSendPort()] = 87;
- Expect.equals(42, map[rp0.toSendPort()]);
- Expect.equals(87, map[rp1.toSendPort()]);
-
- map[rp0.toSendPort()] = 99;
- Expect.equals(99, map[rp0.toSendPort()]);
- Expect.equals(87, map[rp1.toSendPort()]);
-
- map.remove(rp0.toSendPort());
- Expect.equals(false, map.containsKey(rp0.toSendPort()));
- Expect.equals(87, map[rp1.toSendPort()]);
-
- map.remove(rp1.toSendPort());
- Expect.equals(false, map.containsKey(rp0.toSendPort()));
- Expect.equals(false, map.containsKey(rp1.toSendPort()));
-
- rp0.close();
- rp1.close();
- }
-
-}
-
-main() {
- PortTest.testMain();
-}
« no previous file with comments | « tests/corelib/src/FuturesTest.dart ('k') | tests/isolate/isolate.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698