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

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

Issue 95183002: Add the index information to network interface (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 7 years 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 9
10 void testListLoopback() { 10 void testListLoopback() {
(...skipping 15 matching lines...) Expand all
26 NetworkInterface.list(includeLinkLocal: false).then((list) { 26 NetworkInterface.list(includeLinkLocal: false).then((list) {
27 for (var i in list) { 27 for (var i in list) {
28 for (var a in i.addresses) { 28 for (var a in i.addresses) {
29 Expect.isFalse(a.isLinkLocal); 29 Expect.isFalse(a.isLinkLocal);
30 } 30 }
31 } 31 }
32 }); 32 });
33 } 33 }
34 34
35 35
36 void testListIndex() {
37 var set = new Set();
38 NetworkInterface.list(includeLoopback: true).then((list) {
39 for (var i in list) {
40 Expect.isNotNull(i.index);
41 Expect.isFalse(set.contains(i.index));
42 set.add(i.index);
43 Expect.isTrue(set.contains(i.index));
44 }
45 });
46 }
47
48
36 void main() { 49 void main() {
37 testListLoopback(); 50 testListLoopback();
38 testListLinkLocal(); 51 testListLinkLocal();
52 testListIndex();
39 } 53 }
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