diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2018-02-23 16:03:16 +0100 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2018-02-23 16:03:16 +0100 |
commit | d5486ba77235a874245fbee07a75cea89fa59ea2 (patch) | |
tree | 7f2df53da4c018fbfa6ec57809bcd2fcefaf0624 /unittest/test_C_API.cpp | |
parent | 102ee60cd8ee9e5ce263de1d4a775acf29f37fbc (diff) | |
parent | a262472826830ea0a98a4da2fa8f665d359b8789 (diff) | |
download | libnitrokey-d5486ba77235a874245fbee07a75cea89fa59ea2.tar.gz libnitrokey-d5486ba77235a874245fbee07a75cea89fa59ea2.tar.bz2 |
Merge branch 'wip-support_storage_v0.51'
Support for functionality added in v0.49/v0.51
Diffstat (limited to 'unittest/test_C_API.cpp')
-rw-r--r-- | unittest/test_C_API.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/unittest/test_C_API.cpp b/unittest/test_C_API.cpp index d5076c4..be47f08 100644 --- a/unittest/test_C_API.cpp +++ b/unittest/test_C_API.cpp @@ -28,8 +28,10 @@ static const int TOO_LONG_STRING = 200; #include "log.h" #include "../NK_C_API.h" +int login; + TEST_CASE("C API connect", "[BASIC]") { - auto login = NK_login_auto(); + login = NK_login_auto(); REQUIRE(login != 0); NK_logout(); login = NK_login_auto(); @@ -40,11 +42,13 @@ TEST_CASE("C API connect", "[BASIC]") { } TEST_CASE("Check retry count", "[BASIC]") { + REQUIRE(login != 0); REQUIRE(NK_get_admin_retry_count() == 3); REQUIRE(NK_get_user_retry_count() == 3); } TEST_CASE("Check long strings", "[STANDARD]") { + REQUIRE(login != 0); const char* longPin = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; const char* pin = "123123123"; auto result = NK_change_user_PIN(longPin, pin); |