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

Unified Diff: tests/standalone/src/io/FileTest.dart

Issue 9652001: SendPort + ReceivePort changes: (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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/standalone/src/io/FileInputStreamTest.dart ('k') | tests/standalone/src/io/StreamPipeTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/src/io/FileTest.dart
diff --git a/tests/standalone/src/io/FileTest.dart b/tests/standalone/src/io/FileTest.dart
index 0a41614a88cf03c201b1fb87587dec0397d43a86..df49cf83a652ff6bcee8c9d3731753df7bfd58c3 100644
--- a/tests/standalone/src/io/FileTest.dart
+++ b/tests/standalone/src/io/FileTest.dart
@@ -480,8 +480,9 @@ class FileTest {
asyncTestStarted();
// Port to verify that the test completes.
- var port = new ReceivePort.singleShot();
+ var port = new ReceivePort();
port.receive((message, replyTo) {
+ port.close();
Expect.equals(1, message);
asyncTestDone("testDirectory");
});
@@ -879,8 +880,9 @@ class FileTest {
}
static void testReadAsBytes() {
- var port = new ReceivePort.singleShot();
+ var port = new ReceivePort();
port.receive((result, replyTo) {
+ port.close();
Expect.equals(42, result);
});
var name = getFilename("tests/vm/data/fixed_length_file");
@@ -902,8 +904,9 @@ class FileTest {
}
static void testReadAsText() {
- var port = new ReceivePort.singleShot();
+ var port = new ReceivePort();
port.receive((result, replyTo) {
+ port.close();
Expect.equals(1, result);
});
var name = getFilename("tests/vm/data/fixed_length_file");
@@ -954,8 +957,9 @@ class FileTest {
}
static void testReadAsLines() {
- var port = new ReceivePort.singleShot();
+ var port = new ReceivePort();
port.receive((result, replyTo) {
+ port.close();
Expect.equals(42, result);
});
var name = getFilename("tests/vm/data/fixed_length_file");
@@ -985,8 +989,9 @@ class FileTest {
static void testReadAsErrors() {
- var port = new ReceivePort.singleShot();
+ var port = new ReceivePort();
port.receive((message, _) {
+ port.close();
Expect.equals(1, message);
});
var f = new File('.');
« no previous file with comments | « tests/standalone/src/io/FileInputStreamTest.dart ('k') | tests/standalone/src/io/StreamPipeTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698