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

Unified Diff: tests/isolate/src/NestedSpawn2Test.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/MixedTest.dart ('k') | tests/isolate/src/NestedSpawnTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/isolate/src/NestedSpawn2Test.dart
diff --git a/tests/isolate/src/NestedSpawn2Test.dart b/tests/isolate/src/NestedSpawn2Test.dart
index 38e525c94a80c66e4e8afd45b109316ce7f3f718..9b1ae10308dfb367e0614057caa8bd45809db02e 100644
--- a/tests/isolate/src/NestedSpawn2Test.dart
+++ b/tests/isolate/src/NestedSpawn2Test.dart
@@ -8,7 +8,7 @@
#library('NestedSpawn2Test');
#import("dart:isolate");
-#import('TestFramework.dart');
+#import('../../../lib/unittest/unittest.dart');
class IsolateA extends Isolate {
IsolateA() : super.heavy();
@@ -63,24 +63,21 @@ class IsolateB extends Isolate {
}
}
-test(TestExpectation expect) {
- expect.completes(new IsolateA().spawn()).then((SendPort port) {
- _call(port, "launch nested!", expect.runs2((msg, replyTo) {
- Expect.equals("0", msg[0]);
- _call(replyTo, msg1, expect.runs2((msg, replyTo) {
- Expect.equals("2", msg[0]);
- _call(replyTo, msg3, expect.runs2((msg, replyTo) {
- Expect.equals("4", msg[0]);
- _call(replyTo, msg5, expect.runs2((msg, replyTo) {
- Expect.equals("6", msg[0]);
- expect.succeeded();
+main() {
+ test("spawned isolate can spawn other isolates", () {
+ new IsolateA().spawn().then(expectAsync1((SendPort port) {
+ _call(port, "launch nested!", expectAsync2((msg, replyTo) {
+ Expect.equals("0", msg[0]);
+ _call(replyTo, msg1, expectAsync2((msg, replyTo) {
+ Expect.equals("2", msg[0]);
+ _call(replyTo, msg3, expectAsync2((msg, replyTo) {
+ Expect.equals("4", msg[0]);
+ _call(replyTo, msg5, expectAsync2((msg, replyTo) {
+ Expect.equals("6", msg[0]);
+ }));
}));
}));
}));
}));
});
}
-
-main() {
- runTests([test]);
-}
« no previous file with comments | « tests/isolate/src/MixedTest.dart ('k') | tests/isolate/src/NestedSpawnTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698