| Index: tests/standalone/io/pipe_server_test.dart
|
| diff --git a/tests/standalone/io/pipe_server_test.dart b/tests/standalone/io/pipe_server_test.dart
|
| index f0cba0e48c60d67c2ce03917e0bba39134566b9c..ddbc077d1cda06c3ca41af9bd2b8cb0e58aaa1df 100644
|
| --- a/tests/standalone/io/pipe_server_test.dart
|
| +++ b/tests/standalone/io/pipe_server_test.dart
|
| @@ -18,18 +18,15 @@ import "dart:io";
|
| import "dart:isolate";
|
| part "testing_server.dart";
|
|
|
| -
|
| String getDataFilename(String path) =>
|
| Platform.script.resolve(path).toFilePath();
|
|
|
| -
|
| bool compareFileContent(String fileName1, String fileName2) {
|
| var contents1 = new File(fileName1).readAsStringSync();
|
| var contents2 = new File(fileName2).readAsStringSync();
|
| return contents1 == contents2;
|
| }
|
|
|
| -
|
| // This test does:
|
| // 1. Opens a socket to the testing server.
|
| // 2. Pipes the content of a file to that sockets input stream.
|
| @@ -37,19 +34,15 @@ bool compareFileContent(String fileName1, String fileName2) {
|
| // 4. Pipes the socket output stream to the temp file.
|
| // 5. Expects the original file and the temp file to be equal.
|
| class PipeServerGame {
|
| -
|
| int count = 0;
|
|
|
| - PipeServerGame.start()
|
| - : _messages = 0 {
|
| + PipeServerGame.start() : _messages = 0 {
|
| initialize();
|
| }
|
|
|
| void runTest() {
|
| -
|
| void connectHandler() {
|
| - String srcFileName =
|
| - getDataFilename("readline_test1.dat");
|
| + String srcFileName = getDataFilename("readline_test1.dat");
|
| Stream fileInput = new File(srcFileName).openRead();
|
| fileInput.pipe(_socket).then((_) {
|
| var tempDir = Directory.systemTemp.createTempSync('dart_pipe_server');
|
| @@ -103,7 +96,6 @@ class PipeServerGame {
|
| int _messages;
|
| }
|
|
|
| -
|
| void startPipeServer(SendPort replyPort) {
|
| var server = new PipeServer();
|
| server.init().then((port) {
|
| @@ -111,7 +103,6 @@ void startPipeServer(SendPort replyPort) {
|
| });
|
| }
|
|
|
| -
|
| // The testing server will simply pipe each connecting sockets input
|
| // stream to its output stream.
|
| class PipeServer extends TestingServer {
|
| @@ -120,7 +111,6 @@ class PipeServer extends TestingServer {
|
| }
|
| }
|
|
|
| -
|
| main() {
|
| asyncStart();
|
| PipeServerGame echoServerGame = new PipeServerGame.start();
|
|
|