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

Unified Diff: tests/isolate/message_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/message2_test.dart ('k') | tests/isolate/mint_maker_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/isolate/message_test.dart
===================================================================
--- tests/isolate/message_test.dart (revision 14440)
+++ tests/isolate/message_test.dart (working copy)
@@ -5,9 +5,9 @@
// Dart test program for testing serialization of messages.
// VMOptions=--enable_type_checks --enable_asserts
-#library('MessageTest');
-#import("dart:isolate");
-#import('../../pkg/unittest/unittest.dart');
+library MessageTest;
+import 'dart:isolate';
+import '../../pkg/unittest/lib/unittest.dart';
// ---------------------------------------------------------------------------
// Message passing test.
@@ -29,14 +29,14 @@
];
static void VerifyMap(Map expected, Map actual) {
- Expect.equals(true, expected is Map);
- Expect.equals(true, actual is Map);
- Expect.equals(expected.length, actual.length);
+ expect(expected, isMap);
+ expect(actual, isMap);
+ expect(actual.length, expected.length);
testForEachMap(key, value) {
if (value is List) {
VerifyList(value, actual[key]);
} else {
- Expect.equals(value, actual[key]);
+ expect(actual[key], value);
}
}
expected.forEach(testForEachMap);
@@ -49,16 +49,16 @@
} else if (expected[i] is Map) {
VerifyMap(expected[i], actual[i]);
} else {
- Expect.equals(expected[i], actual[i]);
+ expect(actual[i], expected[i]);
}
}
}
static void VerifyObject(int index, var actual) {
var expected = elms[index];
- Expect.equals(true, expected is List);
- Expect.equals(true, actual is List);
- Expect.equals(expected.length, actual.length);
+ expect(expected, isList);
+ expect(actual, isList);
+ expect(actual.length, expected.length);
VerifyList(expected, actual);
}
}
@@ -107,22 +107,22 @@
sendObject[3] = sendObject;
sendObject[4] = local_list3;
remote.call(sendObject).then((var replyObject) {
- Expect.equals(true, sendObject is List);
- Expect.equals(true, replyObject is List);
- Expect.equals(sendObject.length, replyObject.length);
- Expect.equals(true, replyObject[1] === replyObject);
- Expect.equals(true, replyObject[3] === replyObject);
- Expect.equals(true, replyObject[0] === replyObject[2][1]);
- Expect.equals(true, replyObject[0] === replyObject[2][2]);
- Expect.equals(true, replyObject[2] === replyObject[4][0]);
- Expect.equals(true, replyObject[0][0] === replyObject[0][2]);
+ expect(sendObject, isList);
+ expect(replyObject, isList);
+ expect(sendObject.length, equals(replyObject.length));
+ expect(replyObject[1], same(replyObject));
+ expect(replyObject[3], same(replyObject));
+ expect(replyObject[0], same(replyObject[2][1]));
+ expect(replyObject[0], same(replyObject[2][2]));
+ expect(replyObject[2], same(replyObject[4][0]));
+ expect(replyObject[0][0], same(replyObject[0][2]));
// Bigint literals are not canonicalized so do a == check.
- Expect.equals(true, replyObject[0][3] == replyObject[4][4]);
+ expect(replyObject[0][3], equals(replyObject[4][4]));
});
// Shutdown the MessageServer.
remote.call(-1).then(expectAsync1((int message) {
- Expect.equals(MessageTest.elms.length + 1, message);
+ expect(message, MessageTest.elms.length + 1);
}));
});
}
« no previous file with comments | « tests/isolate/message2_test.dart ('k') | tests/isolate/mint_maker_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698