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

Unified Diff: tests/isolate/src/SpawnTest.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/RequestReplyTest.dart ('k') | tests/isolate/src/StaticStateTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/isolate/src/SpawnTest.dart
diff --git a/tests/isolate/src/SpawnTest.dart b/tests/isolate/src/SpawnTest.dart
index 43c3953ee01535aa4984a06ee5b97021b1f4f3ec..6194312a0b8eeb20551805c88afd5cb0ba719a68 100644
--- a/tests/isolate/src/SpawnTest.dart
+++ b/tests/isolate/src/SpawnTest.dart
@@ -4,15 +4,14 @@
#library("SpawnTest");
#import("dart:isolate");
-#import('../../../lib/unittest/unittest.dart');
+#import("TestFramework.dart");
-main() {
- test("spawn a new isolate", () {
- SpawnedIsolate isolate = new SpawnedIsolate();
- isolate.spawn().then(expectAsync1((SendPort port) {
- port.call(42).then(expectAsync1((message) {
- Expect.equals(42, message);
- }));
+void test(TestExpectation expect) {
+ SpawnedIsolate isolate = new SpawnedIsolate();
+ expect.completes(isolate.spawn()).then((SendPort port) {
+ port.call(42).then(expect.runs1((message) {
+ Expect.equals(42, message);
+ expect.succeeded();
}));
});
}
@@ -30,3 +29,7 @@ class SpawnedIsolate extends Isolate {
}
}
+
+main() {
+ runTests([test]);
+}
« no previous file with comments | « tests/isolate/src/RequestReplyTest.dart ('k') | tests/isolate/src/StaticStateTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698