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

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

Issue 76243002: Don't supply host names for the fixed internet addresses (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated after offline discussion Created 7 years, 1 month 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 | « sdk/lib/io/socket.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 import 'dart:io'; 5 import 'dart:io';
6 6
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 8
9 void testDefaultAddresses() { 9 void testDefaultAddresses() {
10 var loopback4 = InternetAddress.LOOPBACK_IP_V4; 10 var loopback4 = InternetAddress.LOOPBACK_IP_V4;
11 Expect.isNotNull(loopback4); 11 Expect.isNotNull(loopback4);
12 Expect.equals(InternetAddressType.IP_V4, loopback4.type); 12 Expect.equals(InternetAddressType.IP_V4, loopback4.type);
13 Expect.equals("localhost", loopback4.host); 13 Expect.equals("127.0.0.1", loopback4.host);
14 Expect.equals("127.0.0.1", loopback4.address); 14 Expect.equals("127.0.0.1", loopback4.address);
15 15
16 var loopback6 = InternetAddress.LOOPBACK_IP_V6; 16 var loopback6 = InternetAddress.LOOPBACK_IP_V6;
17 Expect.isNotNull(loopback6); 17 Expect.isNotNull(loopback6);
18 Expect.equals(InternetAddressType.IP_V6, loopback6.type); 18 Expect.equals(InternetAddressType.IP_V6, loopback6.type);
19 Expect.equals("ip6-localhost", loopback6.host); 19 Expect.equals("::1", loopback6.host);
20 Expect.equals("::1", loopback6.address); 20 Expect.equals("::1", loopback6.address);
21 21
22 var any4 = InternetAddress.ANY_IP_V4; 22 var any4 = InternetAddress.ANY_IP_V4;
23 Expect.isNotNull(any4); 23 Expect.isNotNull(any4);
24 Expect.equals(InternetAddressType.IP_V4, any4.type); 24 Expect.equals(InternetAddressType.IP_V4, any4.type);
25 Expect.equals("0.0.0.0", any4.host); 25 Expect.equals("0.0.0.0", any4.host);
26 Expect.equals("0.0.0.0", any4.address); 26 Expect.equals("0.0.0.0", any4.address);
27 27
28 var any6 = InternetAddress.ANY_IP_V6; 28 var any6 = InternetAddress.ANY_IP_V6;
29 Expect.isNotNull(any6); 29 Expect.isNotNull(any6);
(...skipping 28 matching lines...) Expand all
58 Expect.notEquals('127.0.0.1', addr.host); 58 Expect.notEquals('127.0.0.1', addr.host);
59 }); 59 });
60 }); 60 });
61 } 61 }
62 62
63 void main() { 63 void main() {
64 testDefaultAddresses(); 64 testDefaultAddresses();
65 testLookup(); 65 testLookup();
66 testReverseLookup(); 66 testReverseLookup();
67 } 67 }
OLDNEW
« no previous file with comments | « sdk/lib/io/socket.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698