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

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

Issue 10153005: unittest step 3 and 4: remove TestFramework.dart, make test.dart use (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/Message2Test.dart
diff --git a/tests/isolate/src/Message2Test.dart b/tests/isolate/src/Message2Test.dart
index 3d6767412bc2556ab383dfc5dfa9a45e56f3bb8a..1465f29a79874d61930aed7ec1854455947405ff 100644
--- a/tests/isolate/src/Message2Test.dart
+++ b/tests/isolate/src/Message2Test.dart
@@ -7,7 +7,8 @@
#library('Message2Test');
#import("dart:isolate");
-#import("TestFramework.dart");
+
+#import('../../../lib/unittest/unittest.dart');
// ---------------------------------------------------------------------------
// Message passing test 2.
@@ -57,21 +58,18 @@ class PingPongServer extends Isolate {
}
}
-void test(TestExpectation expect) {
- expect.completes(new PingPongServer().spawn()).then((SendPort remote) {
- Map m = new Map();
- m[1] = "eins";
- m[2] = "deux";
- m[3] = "tre";
- m[4] = "four";
- remote.call(m).then(expect.runs1((var received) {
- MessageTest.mapEqualsDeep(m, received);
- remote.send(-1, null);
- expect.succeeded();
+main() {
+ test("map is equal after it is sent back and forth", () {
+ new PingPongServer().spawn().then(later1((SendPort remote) {
+ Map m = new Map();
+ m[1] = "eins";
+ m[2] = "deux";
+ m[3] = "tre";
+ m[4] = "four";
+ remote.call(m).then(later1((var received) {
+ MessageTest.mapEqualsDeep(m, received);
+ remote.send(-1, null);
+ }));
}));
});
}
-
-main() {
- runTests([test]);
-}

Powered by Google App Engine
This is Rietveld 408576698