diff options
author | Robin Krahl <me@robin-krahl.de> | 2019-01-13 12:03:43 +0100 |
---|---|---|
committer | Robin Krahl <me@robin-krahl.de> | 2019-01-13 12:03:43 +0100 |
commit | 71d4ecc04c23342f207e7f1133ea8824a1dcdd16 (patch) | |
tree | 2c51eeb8fee8fc928cd1f32040b0140088507b50 /unittest | |
parent | 4a7ce051bd4004fb62f1c7022d92efa2ce42b6ab (diff) | |
download | libnitrokey-71d4ecc04c23342f207e7f1133ea8824a1dcdd16.tar.gz libnitrokey-71d4ecc04c23342f207e7f1133ea8824a1dcdd16.tar.bz2 |
Change Nitrokey::list_devices return type to use DeviceInfo
In the previous commit, we changed the return value of Device::enumerate
to std::vector<DeviceInfo>. Now we change Nitrokey::list_devices to
also return DeviceInfo instances.
Diffstat (limited to 'unittest')
-rw-r--r-- | unittest/test_multiple_devices.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/unittest/test_multiple_devices.cc b/unittest/test_multiple_devices.cc index b224653..f9e9ad2 100644 --- a/unittest/test_multiple_devices.cc +++ b/unittest/test_multiple_devices.cc @@ -90,7 +90,10 @@ TEST_CASE("Use API", "[BASIC]") { REQUIRE(v.size() > 0); for (int i=0; i<10; i++){ - for (auto a : v) { + for (auto i : v) { + if (i.m_deviceModel != DeviceModel::STORAGE) + continue; + auto a = i.m_path; std::cout <<"Connect with: " << a << " " << std::boolalpha << nm->connect_with_path(a) << " "; try{ |