summaryrefslogtreecommitdiff
path: root/unittest/test_offline.cc
diff options
context:
space:
mode:
Diffstat (limited to 'unittest/test_offline.cc')
-rw-r--r--unittest/test_offline.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/unittest/test_offline.cc b/unittest/test_offline.cc
index e34eeb4..9d2f195 100644
--- a/unittest/test_offline.cc
+++ b/unittest/test_offline.cc
@@ -161,6 +161,16 @@ TEST_CASE("Test device commands ids", "[fast]") {
}
+#include "version.h"
+TEST_CASE("Test version getter", "[fast]") {
+ REQUIRE(nitrokey::get_major_library_version() >= 3u);
+ REQUIRE(nitrokey::get_minor_library_version() >= 3u);
+ const char *library_version = nitrokey::get_library_version();
+ REQUIRE(library_version != nullptr);
+ std::string s = library_version;
+ REQUIRE(s.length() >= 8);
+ REQUIRE(s.find("g") != std::string::npos);
+}
TEST_CASE("Connect should not return true after the second attempt", "[fast]") {
int result = 0;