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

Unified Diff: tests/isolate/src/IsolateNegativeTest.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/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 090ba916e726a812d4d01deaf7197495bb3c4123..e00e670723e065f78ba3197859401b3c828abeaa 100644
--- a/tests/isolate/src/IsolateNegativeTest.dart
+++ b/tests/isolate/src/IsolateNegativeTest.dart
@@ -6,7 +6,7 @@
#library('IsolateNegativeTest');
#import('dart:isolate');
-#import('TestFramework.dart');
+#import('../../../lib/unittest/unittest.dart');
class IsolateNegativeTest extends Isolate {
IsolateNegativeTest() : super();
@@ -18,15 +18,12 @@ class IsolateNegativeTest extends Isolate {
}
}
-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() {
+ 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.
+ }));
}));
});
}
-
-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