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

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

Issue 23896002: Fix errors in dart:io tests found by the analyzer (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/standalone/io/raw_socket_typed_data_test.dart ('k') | no next file » | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // VMOptions= 5 // VMOptions=
6 // VMOptions=--short_socket_read 6 // VMOptions=--short_socket_read
7 // VMOptions=--short_socket_write 7 // VMOptions=--short_socket_write
8 // VMOptions=--short_socket_read --short_socket_write 8 // VMOptions=--short_socket_read --short_socket_write
9 9
10 import "dart:async"; 10 import "dart:async";
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 asyncEnd(); 46 asyncEnd();
47 }); 47 });
48 48
49 // Bind to a port already in use. 49 // Bind to a port already in use.
50 asyncStart(); 50 asyncStart();
51 ServerSocket.bind("127.0.0.1", 0) 51 ServerSocket.bind("127.0.0.1", 0)
52 .then((s) { 52 .then((s) {
53 ServerSocket.bind("127.0.0.1", s.port) 53 ServerSocket.bind("127.0.0.1", s.port)
54 .then((t) { 54 .then((t) {
55 Expect.fail("Multiple listens on same port"); 55 Expect.fail("Multiple listens on same port");
56 port.toSendPort().send(1);
57 }) 56 })
58 .catchError((error) { 57 .catchError((error) {
59 Expect.isTrue(error is SocketException); 58 Expect.isTrue(error is SocketException);
60 s.close(); 59 s.close();
61 asyncEnd(); 60 asyncEnd();
62 }); 61 });
63 }); 62 });
64 } 63 }
65 64
66 void testConnectNoDestroy() { 65 void testConnectNoDestroy() {
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 testConnectImmediateDestroy(); 219 testConnectImmediateDestroy();
221 testConnectConsumerClose(); 220 testConnectConsumerClose();
222 testConnectConsumerWriteClose(); 221 testConnectConsumerWriteClose();
223 testConnectStreamClose(); 222 testConnectStreamClose();
224 testConnectStreamDataClose(true); 223 testConnectStreamDataClose(true);
225 testConnectStreamDataClose(false); 224 testConnectStreamDataClose(false);
226 testConnectStreamDataCloseCancel(true); 225 testConnectStreamDataCloseCancel(true);
227 testConnectStreamDataCloseCancel(false); 226 testConnectStreamDataCloseCancel(false);
228 asyncEnd(); 227 asyncEnd();
229 } 228 }
OLDNEW
« no previous file with comments | « tests/standalone/io/raw_socket_typed_data_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698