diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2012-04-21 16:47:02 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2012-04-21 16:47:02 -0700 |
commit | 7dbe393629a263675ccfd6fce8e7fc12496c808a (patch) | |
tree | 6ebb6e166ec727e08b625d8566cc7368fbaf4320 /src/test | |
parent | d5eb41fa0816384c00a33b360963fab573592bc1 (diff) | |
parent | 88dc2d6c6a4a71297c30339fc62ce60e53df5dc8 (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.cpp | 11 |
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"); |