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

Unified Diff: tests/isolate/isolate_negative_test.dart

Issue 10837070: Remove old isolate API and update all code in the repository to use (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Created 8 years, 5 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/isolate_import_negative_test.dart ('k') | tests/isolate/mandel_isolate_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/isolate/isolate_negative_test.dart
diff --git a/tests/isolate/isolate_negative_test.dart b/tests/isolate/isolate_negative_test.dart
index d3cb0e6ce6f71239de59630a4228addb605333dc..d324f570d98c418d45f0497a6f86b4ed1b70b6a2 100644
--- a/tests/isolate/isolate_negative_test.dart
+++ b/tests/isolate/isolate_negative_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -8,22 +8,17 @@
#import('dart:isolate');
#import('../../lib/unittest/unittest.dart');
-class IsolateNegativeTest extends Isolate {
- IsolateNegativeTest() : super();
-
- void main() {
- this.port.receive((ignored, replyTo) {
- replyTo.send("foo", null);
- });
- }
+void entry() {
+ port.receive((ignored, replyTo) {
+ replyTo.send("foo", null);
+ });
}
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.
- }));
+ SendPort port = spawnFunction(entry);
+ port.call("foo").then(expectAsync1((message) {
+ Expect.equals(true, "Expected fail"); // <=-------- Should fail here.
}));
});
}
« no previous file with comments | « tests/isolate/isolate_import_negative_test.dart ('k') | tests/isolate/mandel_isolate_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698