From da5606ff80dcd196deaa504626150c7e2a3b825f Mon Sep 17 00:00:00 2001 From: Szczepan Zalega Date: Sat, 7 Oct 2017 14:36:40 +0200 Subject: Enter bytes directly instead of using string Signed-off-by: Szczepan Zalega --- unittest/test_offline.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'unittest/test_offline.cc') diff --git a/unittest/test_offline.cc b/unittest/test_offline.cc index a85a41f..58c7555 100644 --- a/unittest/test_offline.cc +++ b/unittest/test_offline.cc @@ -90,9 +90,10 @@ TEST_CASE("Test helper function - hex_string_to_byte", "[fast]") { using namespace nitrokey::misc; std::vector v; REQUIRE_NOTHROW(v = hex_string_to_byte("00112233445566")); - const uint8_t test_data[] = "\x00\x11\x22\x33\x44\x55\x66"; - REQUIRE(v.size() == sizeof(test_data)-1); + const uint8_t test_data[] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66}; + REQUIRE(v.size() == sizeof(test_data)); for (int i = 0; i < v.size(); ++i) { + INFO("Position i: " << i); REQUIRE(v.data()[i] == test_data[i]); } } -- cgit v1.2.1