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

Unified Diff: runtime/tests/dart/src/EchoServerStreamReadUntilTest.dart

Issue 8226016: Add the ability to run tests with several sets of VM flags (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments from ngeoffray@ Created 9 years, 2 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 | « runtime/bin/socket_stream.dart ('k') | runtime/tests/dart/src/EchoServerStreamTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/tests/dart/src/EchoServerStreamReadUntilTest.dart
diff --git a/runtime/tests/dart/src/EchoServerStreamReadUntilTest.dart b/runtime/tests/dart/src/EchoServerStreamReadUntilTest.dart
index e8df2282668230572adde6a9bc793a730bbfa616..cca1ed53ea9ce04bc2565063622d7c8b1dc53275 100644
--- a/runtime/tests/dart/src/EchoServerStreamReadUntilTest.dart
+++ b/runtime/tests/dart/src/EchoServerStreamReadUntilTest.dart
@@ -3,6 +3,11 @@
// BSD-style license that can be found in the LICENSE file.
//
// Echo server test program to test socket stream read until functionality.
+//
+// VMOptions=
+// VMOptions=--short_socket_read
+// VMOptions=--short_socket_write
+// VMOptions=--short_socket_read --short_socket_write
main() {
EchoServerStreamReadUntilTest.testMain();
@@ -146,12 +151,16 @@ class EchoServer extends Isolate {
for (int i = 0; i < MSGSIZE - 1; i++) {
Expect.equals(EchoServerGame.FIRSTCHAR + i, buffer[i]);
}
- outputStream.write(buffer, 0, buffer.length, null);
- inputStream.readUntil(PATTERN2, dataReceived);
+ void next() {
+ inputStream.readUntil(PATTERN2, dataReceived);
+ }
+ bool done = outputStream.write(buffer, 0, buffer.length, next);
+ if (done) {
+ next();
+ }
} else {
Expect.equals(1, buffer.length);
outputStream.write(buffer, 0, buffer.length, null);
- inputStream.readUntil(PATTERN2, dataReceived);
}
}
« no previous file with comments | « runtime/bin/socket_stream.dart ('k') | runtime/tests/dart/src/EchoServerStreamTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698