diff options
author | Kosta Zertsekel <zertsekel@gmail.com> | 2018-03-01 07:26:18 +0200 |
---|---|---|
committer | Kosta Zertsekel <zertsekel@gmail.com> | 2018-03-01 07:31:35 +0200 |
commit | 90eac8c1f2250800fb701eae601d86f66d6067c6 (patch) | |
tree | 34dd8f42c400847701d6aa0f3eb63378c845084a | |
parent | a99f9be0ebd4062fd73648d525b2c7961f845580 (diff) | |
download | bitcoin-90eac8c1f2250800fb701eae601d86f66d6067c6.tar.xz |
Add tests for HexStr corner cases
Signed-off-by: Kosta Zertsekel <zertsekel@gmail.com>
-rw-r--r-- | src/test/util_tests.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp index 3811569c0a..541ed81cca 100644 --- a/src/test/util_tests.cpp +++ b/src/test/util_tests.cpp @@ -95,6 +95,20 @@ BOOST_AUTO_TEST_CASE(util_HexStr) "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( HexStr(ParseHex_expected, ParseHex_expected, true), ""); |