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

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

Issue 13860006: Fix static type errors in a number of tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 // Tests socket exceptions. 5 // Tests socket exceptions.
6 6
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 import "dart:async"; 8 import "dart:async";
9 import "dart:isolate"; 9 import "dart:isolate";
10 import "dart:io"; 10 import "dart:io";
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 }); 46 });
47 }); 47 });
48 } 48 }
49 49
50 static void serverSocketListenCloseTest() { 50 static void serverSocketListenCloseTest() {
51 var port = new ReceivePort(); 51 var port = new ReceivePort();
52 ServerSocket.bind().then((server) { 52 ServerSocket.bind().then((server) {
53 Socket.connect("127.0.0.1", server.port).then((socket) { 53 Socket.connect("127.0.0.1", server.port).then((socket) {
54 server.listen( 54 server.listen(
55 (incoming) => server.close(), 55 (incoming) => server.close(),
56 onDone: port.close()); 56 onDone: port.close);
57 }); 57 });
58 }); 58 });
59 } 59 }
60 60
61 static void clientSocketExceptionTest() { 61 static void clientSocketExceptionTest() {
62 bool exceptionCaught = false; 62 bool exceptionCaught = false;
63 bool wrongExceptionCaught = false; 63 bool wrongExceptionCaught = false;
64 64
65 ServerSocket.bind().then((server) { 65 ServerSocket.bind().then((server) {
66 Expect.isNotNull(server); 66 Expect.isNotNull(server);
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 clientSocketAddCloseErrorTest(); 233 clientSocketAddCloseErrorTest();
234 clientSocketAddCloseResultErrorTest(); 234 clientSocketAddCloseResultErrorTest();
235 unknownHostTest(); 235 unknownHostTest();
236 } 236 }
237 } 237 }
238 238
239 main() { 239 main() {
240 SocketExceptionTest.testMain(); 240 SocketExceptionTest.testMain();
241 } 241 }
242 242
OLDNEW
« no previous file with comments | « tests/standalone/io/socket_close_test.dart ('k') | tests/standalone/io/socket_many_connections_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698