From 317694c0796c536bb3397f89db6f7d23e3b09100 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Wed, 13 Apr 2016 22:12:39 +0200 Subject: checking slots programmed with nitrokey app (should be moved to separate TC) Signed-off-by: Szczepan Zalega --- unittest/test_HOTP.cc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'unittest') diff --git a/unittest/test_HOTP.cc b/unittest/test_HOTP.cc index 9db23ca..b263693 100644 --- a/unittest/test_HOTP.cc +++ b/unittest/test_HOTP.cc @@ -34,8 +34,9 @@ TEST_CASE("test secret", "[functions]") { } TEST_CASE("Test HOTP codes according to RFC", "[HOTP]") { - Stick10 stick; - bool connected = stick.connect(); + Stick10 stick; + bool connected = stick.connect(); + REQUIRE(connected == true); Log::instance().set_loglevel(Loglevel::DEBUG); @@ -84,6 +85,15 @@ TEST_CASE("Test HOTP codes according to RFC", "[HOTP]") { auto resp = GetHOTP::CommandTransaction::run(stick, gh); REQUIRE( resp.code == code); } + //checking slot programmed before with nitro-app + /* + for( auto code: codes){ + GetHOTP::CommandTransaction::CommandPayload gh; + gh.slot_number = 0x12; + auto resp = GetHOTP::CommandTransaction::run(stick, gh); + REQUIRE( resp.code == code); + } + */ } -- cgit v1.2.3