diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2016-10-22 19:31:59 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2016-11-26 18:56:22 +0100 |
commit | 3b0452c05b84ede5a2085aee4a550a2a63ccdb65 (patch) | |
tree | 6aeecd8d59aee7088f27e40a87a83d11e8a942d3 | |
parent | 2e131cfb2b79f3b1d4406ed1d57f22e6421bbaca (diff) | |
download | libnitrokey-3b0452c05b84ede5a2085aee4a550a2a63ccdb65.tar.gz libnitrokey-3b0452c05b84ede5a2085aee4a550a2a63ccdb65.tar.bz2 |
C++ tests update
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
-rw-r--r-- | unittest/test2.cc | 23 |
1 files changed, 19 insertions, 4 deletions
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<EnableEncryptedPartition>(); +// p.set_kind_user(); +// strcpyT(p.password, "123456"); +// EnableEncryptedPartition::CommandTransaction::run(stick, p); +// } +// { +// auto p = get_payload<DisableEncryptedPartition>(); +// p.set_kind_user(); +// strcpyT(p.password, "123456"); +// DisableEncryptedPartition::CommandTransaction::run(stick, p); +// } + { auto p = get_payload<EnableEncryptedPartition>(); p.set_kind_user(); strcpyT(p.password, "123456"); EnableEncryptedPartition::CommandTransaction::run(stick, p); } - { - auto p = get_payload<DisableEncryptedPartition>(); + { + auto p = get_payload<EnableHiddenEncryptedPartition>(); p.set_kind_user(); - strcpyT(p.password, "123456"); - DisableEncryptedPartition::CommandTransaction::run(stick, p); + strcpyT(p.password, "123123123"); + EnableHiddenEncryptedPartition::CommandTransaction::run(stick, p); } stick.disconnect(); |