X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Ftest%2Futil_tests.cpp;h=3a4c035a30aa25055a963aaad880f5392bb35362;hb=84a4a7763f386934da90e2bd1e355b70023fa9ca;hp=db31f4988a96ec14f73564b549162d5dd3a5b939;hpb=f8dcd5ca6f55ad49807cf7491c1f153f6158400e;p=novacoin.git diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp index db31f49..3a4c035 100644 --- a/src/test/util_tests.cpp +++ b/src/test/util_tests.cpp @@ -88,15 +88,28 @@ 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 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) { +/*These are platform-dependant and thus removed to avoid useless test failures BOOST_CHECK_EQUAL(DateTimeStrFormat("%x %H:%M:%S", 0), "01/01/70 00:00:00"); BOOST_CHECK_EQUAL(DateTimeStrFormat("%x %H:%M:%S", 0x7FFFFFFF), "01/19/38 03:14:07"); - // Formats used within bitcoin + // Formats used within Bitcoin BOOST_CHECK_EQUAL(DateTimeStrFormat("%x %H:%M:%S", 1317425777), "09/30/11 23:36:17"); BOOST_CHECK_EQUAL(DateTimeStrFormat("%x %H:%M", 1317425777), "09/30/11 23:36"); +*/ } BOOST_AUTO_TEST_CASE(util_ParseParameters)