blob: ed8f89edc11892d28060f464ae0bc8e2df592093 [file] [log] [blame]
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart = 2.9
/// @assertion
/// Future<List<NetworkInterface>> list({
/// bool includeLoopback: false,
/// bool includeLinkLocal: false,
/// InternetAddressType type: InternetAddressType.any
/// })
/// Query the system for NetworkInterfaces.
///
/// If includeLoopback is true, the returned list will include the loopback
/// device. Default is false.
///
/// If includeLinkLocal is true, the list of addresses of the returned
/// NetworkInterfaces, may include link local addresses. Default is false.
///
/// @description Checks that static method [list] without parameters returns
/// Future that completes to List<NetworkInterface>.
/// @author ngl@unipro.ru
import "dart:async";
import "dart:io";
import "../../../Utils/expect.dart";
main() {
Future<List<NetworkInterface>> fList = NetworkInterface.list();
asyncStart();
fList.then((fValue) {
Expect.isTrue(fValue is List<NetworkInterface>);
asyncEnd();
});
}