| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 import 'dart:io'; |
| 6 |
| 7 import "package:expect/expect.dart"; |
| 8 |
| 9 void test() { |
| 10 var loopback4 = InternetAddress.LOOPBACK_IP_V4; |
| 11 Expect.isNotNull(loopback4); |
| 12 Expect.equals(InternetAddressType.IP_V4, loopback4.type); |
| 13 Expect.equals("localhost", loopback4.host); |
| 14 Expect.equals("127.0.0.1", loopback4.address); |
| 15 |
| 16 var loopback6 = InternetAddress.LOOPBACK_IP_V6; |
| 17 Expect.isNotNull(loopback6); |
| 18 Expect.equals(InternetAddressType.IP_V6, loopback6.type); |
| 19 Expect.equals("ip6-localhost", loopback6.host); |
| 20 Expect.equals("::1", loopback6.address); |
| 21 |
| 22 var any4 = InternetAddress.ANY_IP_V4; |
| 23 Expect.isNotNull(any4); |
| 24 Expect.equals(InternetAddressType.IP_V4, any4.type); |
| 25 Expect.equals("0.0.0.0", any4.host); |
| 26 Expect.equals("0.0.0.0", any4.address); |
| 27 |
| 28 var any6 = InternetAddress.ANY_IP_V6; |
| 29 Expect.isNotNull(any6); |
| 30 Expect.equals(InternetAddressType.IP_V6, any6.type); |
| 31 Expect.equals("::", any6.host); |
| 32 Expect.equals("::", any6.address); |
| 33 } |
| 34 |
| 35 void main() { |
| 36 test(); |
| 37 } |
| OLD | NEW |