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

Unified Diff: tests/isolate/raw_port_test.dart

Issue 70103014: Make isolate tests work on drt (and hopefully dartium). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Retain isolate_stress_test in status file Created 7 years, 1 month 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/nested_spawn_test.dart ('k') | tests/isolate/remote_unittest_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/isolate/raw_port_test.dart
diff --git a/tests/isolate/raw_port_test.dart b/tests/isolate/raw_port_test.dart
index 8e334ca83e4496899f65d1a266e6ba6b917daec8..a7cd2fb26403b50e04b5afb57476ff344e268d71 100644
--- a/tests/isolate/raw_port_test.dart
+++ b/tests/isolate/raw_port_test.dart
@@ -6,17 +6,22 @@
library raw_port_test;
import 'dart:isolate';
-import 'dart:async';
-import '../../pkg/unittest/lib/unittest.dart';
+import 'package:unittest/unittest.dart';
+import 'remote_unittest_helper.dart';
-void remote(SendPort port) { port.send("reply"); }
+void remote(SendPort port) {
+ port.send("reply");
+}
+
void remote2(SendPort port) {
port.send("reply 1");
port.send("reply 2");
}
-main() {
+main([args, port]) {
+ if (testRemote(main, port)) return;
+
test("raw receive", () {
RawReceivePort port = new RawReceivePort();
Isolate.spawn(remote, port.sendPort);
@@ -25,6 +30,7 @@ main() {
port.close();
});
});
+
test("raw receive twice - change handler", () {
RawReceivePort port = new RawReceivePort();
Isolate.spawn(remote2, port.sendPort);
@@ -36,6 +42,7 @@ main() {
});
});
});
+
test("from-raw-port", () {
RawReceivePort rawPort = new RawReceivePort();
Isolate.spawn(remote, rawPort.sendPort);
@@ -53,5 +60,4 @@ main() {
onDone: expectAsync0((){}));
});
});
-
}
« no previous file with comments | « tests/isolate/nested_spawn_test.dart ('k') | tests/isolate/remote_unittest_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698