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

Side by Side Diff: tests/standalone/io/raw_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
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 RawServerSocket.bind(InternetAddress.LOOPBACK_IP_V4, 0) 51 RawServerSocket.bind(InternetAddress.LOOPBACK_IP_V4, 0)
52 .then((s) { 52 .then((s) {
53 RawServerSocket.bind(InternetAddress.LOOPBACK_IP_V4, s.port) 53 RawServerSocket.bind(InternetAddress.LOOPBACK_IP_V4, 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 asyncEnd(); 59 asyncEnd();
61 }); 60 });
62 }); 61 });
63 } 62 }
64 63
65 void testSimpleConnect() { 64 void testSimpleConnect() {
66 asyncStart(); 65 asyncStart();
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 testCloseOneEnd("server"); 384 testCloseOneEnd("server");
386 testInvalidBind(); 385 testInvalidBind();
387 testSimpleConnect(); 386 testSimpleConnect();
388 testServerListenAfterConnect(); 387 testServerListenAfterConnect();
389 testSimpleReadWrite(dropReads: false); 388 testSimpleReadWrite(dropReads: false);
390 testSimpleReadWrite(dropReads: true); 389 testSimpleReadWrite(dropReads: true);
391 testPauseServerSocket(); 390 testPauseServerSocket();
392 testPauseSocket(); 391 testPauseSocket();
393 asyncEnd(); 392 asyncEnd();
394 } 393 }
OLDNEW
« no previous file with comments | « tests/standalone/io/raw_secure_server_socket_test.dart ('k') | tests/standalone/io/raw_socket_typed_data_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698