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

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

Issue 10226008: Revert "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 61dcaabd8db03fbfe674a09a543429a3501509a4..3d6767412bc2556ab383dfc5dfa9a45e56f3bb8a 100644
--- a/tests/isolate/src/Message2Test.dart
+++ b/tests/isolate/src/Message2Test.dart
@@ -7,8 +7,7 @@
#library('Message2Test');
#import("dart:isolate");
-
-#import('../../../lib/unittest/unittest.dart');
+#import("TestFramework.dart");
// ---------------------------------------------------------------------------
// Message passing test 2.
@@ -58,18 +57,21 @@ class PingPongServer extends Isolate {
}
}
-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);
- }));
+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() {
+ 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