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

Unified Diff: tests/isolate/src/IsolateNegativeTest.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/IsolateComplexMessagesTest.dart ('k') | tests/isolate/src/MandelIsolateTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/isolate/src/IsolateNegativeTest.dart
diff --git a/tests/isolate/src/IsolateNegativeTest.dart b/tests/isolate/src/IsolateNegativeTest.dart
index e00e670723e065f78ba3197859401b3c828abeaa..090ba916e726a812d4d01deaf7197495bb3c4123 100644
--- a/tests/isolate/src/IsolateNegativeTest.dart
+++ b/tests/isolate/src/IsolateNegativeTest.dart
@@ -6,7 +6,7 @@
#library('IsolateNegativeTest');
#import('dart:isolate');
-#import('../../../lib/unittest/unittest.dart');
+#import('TestFramework.dart');
class IsolateNegativeTest extends Isolate {
IsolateNegativeTest() : super();
@@ -18,12 +18,15 @@ class IsolateNegativeTest extends Isolate {
}
}
-main() {
- test("ensure isolate code is executed", () {
- new IsolateNegativeTest().spawn().then(expectAsync1((SendPort port) {
- port.call("foo").then(expectAsync1((message) {
- Expect.equals(true, "Expected fail"); // <=-------- Should fail here.
- }));
+void test(TestExpectation expect) {
+ expect.completes(new IsolateNegativeTest().spawn()).then((SendPort port) {
+ port.call("foo").then(expect.runs1((message) {
+ Expect.equals(true, "Expected fail"); // <=-------- Should fail here.
+ expect.succeeded();
}));
});
}
+
+main() {
+ runTests([test]);
+}
« no previous file with comments | « tests/isolate/src/IsolateComplexMessagesTest.dart ('k') | tests/isolate/src/MandelIsolateTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698