OLD | NEW |
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 // Tests socket exceptions. | 5 // Tests socket exceptions. |
6 | 6 |
7 #import("dart:isolate"); | 7 import "dart:isolate"; |
8 #import("dart:io"); | 8 import "dart:io"; |
9 | 9 |
10 class SocketExceptionTest { | 10 class SocketExceptionTest { |
11 | 11 |
12 static const PORT = 0; | 12 static const PORT = 0; |
13 static const HOST = "127.0.0.1"; | 13 static const HOST = "127.0.0.1"; |
14 | 14 |
15 static void serverSocketExceptionTest() { | 15 static void serverSocketExceptionTest() { |
16 bool exceptionCaught = false; | 16 bool exceptionCaught = false; |
17 bool wrongExceptionCaught = false; | 17 bool wrongExceptionCaught = false; |
18 | 18 |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 clientSocketExceptionTest(); | 192 clientSocketExceptionTest(); |
193 indexOutOfRangeExceptionTest(); | 193 indexOutOfRangeExceptionTest(); |
194 unknownHostTest(); | 194 unknownHostTest(); |
195 } | 195 } |
196 } | 196 } |
197 | 197 |
198 main() { | 198 main() { |
199 SocketExceptionTest.testMain(); | 199 SocketExceptionTest.testMain(); |
200 } | 200 } |
201 | 201 |
OLD | NEW |