blob: 6925cb3c8f6fa1d9b4d5d46bb63326e90ee0a21f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// Take a look at the license at the top of the repository in the LICENSE file.
// This test is used to ensure that the networks are not loaded by default.
#[test]
fn test_networks() {
use sysinfo::{NetworksExt, SystemExt};
if sysinfo::System::IS_SUPPORTED {
let s = sysinfo::System::new();
assert_eq!(s.networks().iter().count(), 0);
let s = sysinfo::System::new_all();
assert!(s.networks().iter().count() > 0);
}
}
|