From 3b0452c05b84ede5a2085aee4a550a2a63ccdb65 Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Sat, 22 Oct 2016 19:31:59 +0200 Subject: C++ tests update Signed-off-by: Szczepan Zalega --- unittest/test2.cc | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'unittest') diff --git a/unittest/test2.cc b/unittest/test2.cc index dfc4182..b328c37 100644 --- a/unittest/test2.cc +++ b/unittest/test2.cc @@ -11,6 +11,7 @@ using namespace std; using namespace nitrokey::device; +using namespace nitrokey::proto; using namespace nitrokey::proto::stick20; using namespace nitrokey::log; using namespace nitrokey::misc; @@ -23,17 +24,31 @@ TEST_CASE("test", "[test]") { Log::instance().set_loglevel(Loglevel::DEBUG_L2); + stick10::LockDevice::CommandTransaction::run(stick); +// { +// auto p = get_payload(); +// p.set_kind_user(); +// strcpyT(p.password, "123456"); +// EnableEncryptedPartition::CommandTransaction::run(stick, p); +// } +// { +// auto p = get_payload(); +// p.set_kind_user(); +// strcpyT(p.password, "123456"); +// DisableEncryptedPartition::CommandTransaction::run(stick, p); +// } + { auto p = get_payload(); p.set_kind_user(); strcpyT(p.password, "123456"); EnableEncryptedPartition::CommandTransaction::run(stick, p); } - { - auto p = get_payload(); + { + auto p = get_payload(); p.set_kind_user(); - strcpyT(p.password, "123456"); - DisableEncryptedPartition::CommandTransaction::run(stick, p); + strcpyT(p.password, "123123123"); + EnableHiddenEncryptedPartition::CommandTransaction::run(stick, p); } stick.disconnect(); -- cgit v1.2.3