diff options
Diffstat (limited to 'unittest')
m--------- | unittest/Catch | 0 | ||||
-rw-r--r-- | unittest/test_HOTP.cc | 2 | ||||
-rw-r--r-- | unittest/test_issues.cc | 10 | ||||
-rw-r--r-- | unittest/test_offline.cc | 2 |
4 files changed, 12 insertions, 2 deletions
diff --git a/unittest/Catch b/unittest/Catch -Subproject ae5ee2cf63d6d67bd1369b512d2a7b60b571c90 +Subproject 62dae592c330ab74cea30c897255ee9518639c3 diff --git a/unittest/test_HOTP.cc b/unittest/test_HOTP.cc index a4f42d2..520faaf 100644 --- a/unittest/test_HOTP.cc +++ b/unittest/test_HOTP.cc @@ -50,7 +50,7 @@ TEST_CASE("test secret", "[functions]") { slot_secret[20] = 0; const char* secretHex = "3132333435363738393031323334353637383930"; hexStringToByte(slot_secret, secretHex); - CAPTURE(slot_secret); + INFO("Secret: " << slot_secret); REQUIRE(strcmp("12345678901234567890",reinterpret_cast<char *>(slot_secret) ) == 0 ); } diff --git a/unittest/test_issues.cc b/unittest/test_issues.cc index fe80384..d4fd72e 100644 --- a/unittest/test_issues.cc +++ b/unittest/test_issues.cc @@ -87,6 +87,16 @@ bool test_31(){ } TEST_CASE("issue 31", "[issue]"){ + { + auto i = NitrokeyManager::instance(); + i->set_loglevel(4); + REQUIRE(i->connect()); + + i->unlock_encrypted_volume(default_user_pin); + i->create_hidden_volume(0, 70, 80, hidden_volume_pass); + i->lock_device(); + } + for(int i=0; i<20; i++){ REQUIRE(test_31()); } diff --git a/unittest/test_offline.cc b/unittest/test_offline.cc index 2d1fcb3..3ef63d2 100644 --- a/unittest/test_offline.cc +++ b/unittest/test_offline.cc @@ -115,7 +115,7 @@ TEST_CASE("Test helper function - hex_string_to_byte", "[fast]") { REQUIRE(v.size() == sizeof(test_data)); for (int i = 0; i < v.size(); ++i) { INFO("Position i: " << i); - REQUIRE(v.data()[i] == test_data[i]); + REQUIRE(v[i] == test_data[i]); } } |