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

Side by Side Diff: tests/standalone/io/echo_server_stream_test.dart

Issue 11361190: a === b -> identical(a, b) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/language/strict_equal_test.dart ('k') | tests/standalone/io/echo_server_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // Echo server test program to test socket streams. 5 // Echo server test program to test socket streams.
6 // 6 //
7 // VMOptions= 7 // VMOptions=
8 // VMOptions=--short_socket_read 8 // VMOptions=--short_socket_read
9 // VMOptions=--short_socket_write 9 // VMOptions=--short_socket_write
10 // VMOptions=--short_socket_read --short_socket_write 10 // VMOptions=--short_socket_read --short_socket_write
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 Expect.equals(0, _buffer.length % 2); 97 Expect.equals(0, _buffer.length % 2);
98 stream.writeFrom(_buffer, 0, _buffer.length ~/ 2); 98 stream.writeFrom(_buffer, 0, _buffer.length ~/ 2);
99 stream.writeFrom(_buffer, _buffer.length ~/ 2); 99 stream.writeFrom(_buffer, _buffer.length ~/ 2);
100 break; 100 break;
101 } 101 }
102 stream.close(); 102 stream.close();
103 dataSent(); 103 dataSent();
104 } 104 }
105 105
106 _socket = new Socket(TestingServer.HOST, _port); 106 _socket = new Socket(TestingServer.HOST, _port);
107 if (_socket !== null) { 107 if (_socket != null) {
108 _socket.onConnect = connectHandler; 108 _socket.onConnect = connectHandler;
109 } else { 109 } else {
110 Expect.fail("socket creation failed"); 110 Expect.fail("socket creation failed");
111 } 111 }
112 } 112 }
113 113
114 void initialize() { 114 void initialize() {
115 _receivePort.receive((var message, SendPort replyTo) { 115 _receivePort.receive((var message, SendPort replyTo) {
116 _port = message; 116 _port = message;
117 sendData(); 117 sendData();
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 170
171 inputStream = connection.inputStream; 171 inputStream = connection.inputStream;
172 inputStream.onData = dataReceived; 172 inputStream.onData = dataReceived;
173 connection.onError = errorHandler; 173 connection.onError = errorHandler;
174 } 174 }
175 } 175 }
176 176
177 main() { 177 main() {
178 EchoServerGame echoServerGame = new EchoServerGame.start(); 178 EchoServerGame echoServerGame = new EchoServerGame.start();
179 } 179 }
OLDNEW
« no previous file with comments | « tests/language/strict_equal_test.dart ('k') | tests/standalone/io/echo_server_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698