diff options
author | Robin Krahl <me@robin-krahl.de> | 2019-01-13 12:05:28 +0100 |
---|---|---|
committer | Robin Krahl <me@robin-krahl.de> | 2019-01-13 13:27:31 +0100 |
commit | a80378e0c770a503ddaafc0c7aacb78cac667b8f (patch) | |
tree | 447e63e584b111f7271e55c64427edc126c57ec2 /unittest/test_multiple_devices.cc | |
parent | 2c79c15dc9aa4ec7eca454b793bf43a9a3ba85db (diff) | |
download | libnitrokey-a80378e0c770a503ddaafc0c7aacb78cac667b8f.tar.gz libnitrokey-a80378e0c770a503ddaafc0c7aacb78cac667b8f.tar.bz2 |
Change std::wstring to std::string in DeviceInfo
For easier handling, we should use a std::string instead of
std::wstring for the serial number in DeviceInfo. For the conversion, I
assume that the serial number is valid UTF-8. As it should be
alphanumeric and ASCII only, this should be true.
Diffstat (limited to 'unittest/test_multiple_devices.cc')
-rw-r--r-- | unittest/test_multiple_devices.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/unittest/test_multiple_devices.cc b/unittest/test_multiple_devices.cc index d644cfd..bc1b60b 100644 --- a/unittest/test_multiple_devices.cc +++ b/unittest/test_multiple_devices.cc @@ -42,9 +42,8 @@ TEST_CASE("List devices", "[BASIC]") { std::cout << "Could not create device with model " << i.m_deviceModel << "\n"; continue; } - std::cout << i.m_deviceModel << " " << i.m_path << " "; - std::wcout << i.m_serialNumber; - std::cout << " |"; + std::cout << i.m_deviceModel << " " << i.m_path << " " + << i.m_serialNumber << " |"; d->set_path(i.m_path); d->connect(); auto res = GetStatus::CommandTransaction::run(d); @@ -116,9 +115,8 @@ TEST_CASE("Use API", "[BASIC]") { REQUIRE(v.size() > 0); for (auto i : v) { - std::cout << "Connect with: " << i.m_deviceModel << " " << i.m_path << " "; - std::wcout << i.m_serialNumber; - std::cout << " | " << std::boolalpha << nm->connect_with_path(i.m_path) << " |"; + std::cout << "Connect with: " << i.m_deviceModel << " " << i.m_path << " " + << i.m_serialNumber << " | " << std::boolalpha << nm->connect_with_path(i.m_path) << " |"; try { auto status = nm->get_status(); std::cout << " " << status.card_serial_u32 << " " |