aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-04-21 16:47:02 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2012-04-21 16:47:02 -0700
commit7dbe393629a263675ccfd6fce8e7fc12496c808a (patch)
tree6ebb6e166ec727e08b625d8566cc7368fbaf4320 /src/test
parentd5eb41fa0816384c00a33b360963fab573592bc1 (diff)
parent88dc2d6c6a4a71297c30339fc62ce60e53df5dc8 (diff)
Merge pull request #1131 from laanwj/2012_04_hexstr
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");