util: rewrite toHex using security::transform instead of printHex
Change-Id: If07c434419f44decc866c97adf083051597e7ba6
Refs: #3006
diff --git a/tests/unit-tests/util/string-helper.t.cpp b/tests/unit-tests/util/string-helper.t.cpp
index 65b3e50..c59804b 100644
--- a/tests/unit-tests/util/string-helper.t.cpp
+++ b/tests/unit-tests/util/string-helper.t.cpp
@@ -35,14 +35,13 @@
std::string test = "Hello, world!";
BOOST_CHECK_EQUAL(toHex(reinterpret_cast<const uint8_t*>(test.data()), test.size()),
"48656C6C6F2C20776F726C6421");
-
BOOST_CHECK_EQUAL(toHex(reinterpret_cast<const uint8_t*>(test.data()), test.size(), false),
"48656c6c6f2c20776f726c6421");
-
BOOST_CHECK_EQUAL(toHex(nullptr, 0), "");
Buffer buffer(test.data(), test.size());
BOOST_CHECK_EQUAL(toHex(buffer, false), "48656c6c6f2c20776f726c6421");
+ BOOST_CHECK_EQUAL(toHex(Buffer{}), "");
}
BOOST_AUTO_TEST_CASE(FromHexChar)