aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorKosta Zertsekel <zertsekel@gmail.com>2018-03-01 07:26:18 +0200
committerKosta Zertsekel <zertsekel@gmail.com>2018-03-01 07:31:35 +0200
commit90eac8c1f2250800fb701eae601d86f66d6067c6 (patch)
tree34dd8f42c400847701d6aa0f3eb63378c845084a /src/test
parenta99f9be0ebd4062fd73648d525b2c7961f845580 (diff)
Add tests for HexStr corner cases
Signed-off-by: Kosta Zertsekel <zertsekel@gmail.com>
Diffstat (limited to 'src/test')
-rw-r--r--src/test/util_tests.cpp14
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),
"");