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

Unified Diff: tests/isolate/port_test.dart

Issue 27215002: Very simple version of Isolates. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 2 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/isolate/nested_spawn_test.dart ('k') | tests/isolate/request_reply_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/isolate/port_test.dart
diff --git a/tests/isolate/port_test.dart b/tests/isolate/port_test.dart
index 1de2c3cebb531495d6aa7417fb2c8045ff1abe7e..c61e75da529933cd190453acabb770476ff5c2ed 100644
--- a/tests/isolate/port_test.dart
+++ b/tests/isolate/port_test.dart
@@ -20,8 +20,8 @@ main() {
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);
+ Expect.equals(rp0.sendPort.hashCode, rp0.sendPort.hashCode);
+ Expect.equals(rp1.sendPort.hashCode, rp1.sendPort.hashCode);
rp0.close();
rp1.close();
}
@@ -29,9 +29,9 @@ void testHashCode() {
void testEquals() {
ReceivePort rp0 = new ReceivePort();
ReceivePort rp1 = new ReceivePort();
- Expect.equals(rp0.toSendPort(), rp0.toSendPort());
- Expect.equals(rp1.toSendPort(), rp1.toSendPort());
- Expect.isFalse(rp0.toSendPort() == rp1.toSendPort());
+ Expect.equals(rp0.sendPort, rp0.sendPort);
+ Expect.equals(rp1.sendPort, rp1.sendPort);
+ Expect.isFalse(rp0.sendPort == rp1.sendPort);
rp0.close();
rp1.close();
}
@@ -40,22 +40,22 @@ 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(map[rp0.toSendPort()], 42);
- Expect.equals(map[rp1.toSendPort()], 87);
-
- map[rp0.toSendPort()] = 99;
- Expect.equals(map[rp0.toSendPort()], 99);
- Expect.equals(map[rp1.toSendPort()], 87);
-
- map.remove(rp0.toSendPort());
- Expect.isFalse(map.containsKey(rp0.toSendPort()));
- Expect.equals(map[rp1.toSendPort()], 87);
-
- map.remove(rp1.toSendPort());
- Expect.isFalse(map.containsKey(rp0.toSendPort()));
- Expect.isFalse(map.containsKey(rp1.toSendPort()));
+ map[rp0.sendPort] = 42;
+ map[rp1.sendPort] = 87;
+ Expect.equals(map[rp0.sendPort], 42);
+ Expect.equals(map[rp1.sendPort], 87);
+
+ map[rp0.sendPort] = 99;
+ Expect.equals(map[rp0.sendPort], 99);
+ Expect.equals(map[rp1.sendPort], 87);
+
+ map.remove(rp0.sendPort);
+ Expect.isFalse(map.containsKey(rp0.sendPort));
+ Expect.equals(map[rp1.sendPort], 87);
+
+ map.remove(rp1.sendPort);
+ Expect.isFalse(map.containsKey(rp0.sendPort));
+ Expect.isFalse(map.containsKey(rp1.sendPort));
rp0.close();
rp1.close();
« no previous file with comments | « tests/isolate/nested_spawn_test.dart ('k') | tests/isolate/request_reply_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698