Add tests for HexStr corner cases

Signed-off-by: Kosta Zertsekel <zertsekel@gmail.com>
This commit is contained in:
Kosta Zertsekel 2018-03-01 07:26:18 +02:00
parent a99f9be0eb
commit 90eac8c1f2

View file

@ -94,6 +94,20 @@ BOOST_AUTO_TEST_CASE(util_HexStr)
HexStr(ParseHex_expected, ParseHex_expected + 5, true), HexStr(ParseHex_expected, ParseHex_expected + 5, true),
"04 67 8a fd b0"); "04 67 8a fd b0");
BOOST_CHECK_EQUAL(
HexStr(ParseHex_expected + sizeof(ParseHex_expected),
ParseHex_expected + sizeof(ParseHex_expected)),
"");
BOOST_CHECK_EQUAL(
HexStr(ParseHex_expected + sizeof(ParseHex_expected),
ParseHex_expected + sizeof(ParseHex_expected), true),
"");
BOOST_CHECK_EQUAL(
HexStr(ParseHex_expected, ParseHex_expected),
"");
BOOST_CHECK_EQUAL( BOOST_CHECK_EQUAL(
HexStr(ParseHex_expected, ParseHex_expected, true), HexStr(ParseHex_expected, ParseHex_expected, true),
""); "");