aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2012-04-21 20:15:25 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2012-04-21 20:37:50 +0200
commit88dc2d6c6a4a71297c30339fc62ce60e53df5dc8 (patch)
tree16a02f315f0224724d67ca324e414557d121af96 /src/test
parent00b9c0f4b20f6eb714fa55eb00df326a6f74fd10 (diff)
Integrate @JoelKatz's optimized ToHex (#562) into current HexStr function
Diffstat (limited to 'src/test')
-rw-r--r--src/test/util_tests.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
index db31f4988a..0393edb1a7 100644
--- a/src/test/util_tests.cpp
+++ b/src/test/util_tests.cpp
@@ -88,8 +88,19 @@ BOOST_AUTO_TEST_CASE(util_HexStr)
BOOST_CHECK_EQUAL(
HexStr(ParseHex_expected, ParseHex_expected + 5, true),
"04 67 8a fd b0");
+
+ BOOST_CHECK_EQUAL(
+ HexStr(ParseHex_expected, ParseHex_expected, true),
+ "");
+
+ std::vector<unsigned char> ParseHex_vec(ParseHex_expected, ParseHex_expected + 5);
+
+ BOOST_CHECK_EQUAL(
+ HexStr(ParseHex_vec, true),
+ "04 67 8a fd b0");
}
+
BOOST_AUTO_TEST_CASE(util_DateTimeStrFormat)
{
BOOST_CHECK_EQUAL(DateTimeStrFormat("%x %H:%M:%S", 0), "01/01/70 00:00:00");