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

Unified Diff: tests/isolate/port_test.dart

Issue 11301046: Restructure pkg/unittest and pkg/webdriver to follow the pub conventions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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
===================================================================
--- tests/isolate/port_test.dart (revision 14440)
+++ tests/isolate/port_test.dart (working copy)
@@ -6,10 +6,10 @@
// Note: unittest.dart depends on ports, in particular on the behaviour tested
// here. To keep things simple, we don't use the unittest library here.
-#library("PortTest");
-#import("dart:isolate");
+library PortTest;
+import 'dart:isolate';
+import '../../pkg/unittest/lib/matcher.dart';
-
main() {
testHashCode();
testEquals();
@@ -19,8 +19,8 @@
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(rp0.toSendPort().hashCode, rp0.toSendPort().hashCode);
+ expect(rp1.toSendPort().hashCode, rp1.toSendPort().hashCode);
rp0.close();
rp1.close();
}
@@ -28,9 +28,9 @@
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()));
+ expect(rp0.toSendPort(), rp0.toSendPort());
+ expect(rp1.toSendPort(), rp1.toSendPort());
+ expect(rp0.toSendPort() == rp1.toSendPort(), isFalse);
rp0.close();
rp1.close();
}
@@ -41,20 +41,20 @@
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()]);
+ expect(map[rp0.toSendPort()], 42);
+ expect(map[rp1.toSendPort()], 87);
map[rp0.toSendPort()] = 99;
- Expect.equals(99, map[rp0.toSendPort()]);
- Expect.equals(87, map[rp1.toSendPort()]);
+ expect(map[rp0.toSendPort()], 99);
+ expect(map[rp1.toSendPort()], 87);
map.remove(rp0.toSendPort());
- Expect.equals(false, map.containsKey(rp0.toSendPort()));
- Expect.equals(87, map[rp1.toSendPort()]);
+ expect(map.containsKey(rp0.toSendPort()), isFalse);
+ expect(map[rp1.toSendPort()], 87);
map.remove(rp1.toSendPort());
- Expect.equals(false, map.containsKey(rp0.toSendPort()));
- Expect.equals(false, map.containsKey(rp1.toSendPort()));
+ expect(map.containsKey(rp0.toSendPort()), isFalse);
+ expect(map.containsKey(rp1.toSendPort()), isFalse);
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