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

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
« no previous file with comments | « tests/isolate/src/MandelIsolateTest.dart ('k') | tests/isolate/src/MessageTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/isolate/src/Message2Test.dart
diff --git a/tests/isolate/src/Message2Test.dart b/tests/isolate/src/Message2Test.dart
index 3d6767412bc2556ab383dfc5dfa9a45e56f3bb8a..61dcaabd8db03fbfe674a09a543429a3501509a4 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(expectAsync1((SendPort remote) {
+ Map m = new Map();
+ m[1] = "eins";
+ m[2] = "deux";
+ m[3] = "tre";
+ m[4] = "four";
+ remote.call(m).then(expectAsync1((var received) {
+ MessageTest.mapEqualsDeep(m, received);
+ remote.send(-1, null);
+ }));
}));
});
}
-
-main() {
- runTests([test]);
-}
« no previous file with comments | « tests/isolate/src/MandelIsolateTest.dart ('k') | tests/isolate/src/MessageTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698