diff options
author | Lee Clagett <code@leeclagett.com> | 2020-02-28 17:42:28 -0500 |
---|---|---|
committer | Lee Clagett <code@leeclagett.com> | 2020-02-28 17:42:57 -0500 |
commit | 533d85d44baa480220ffa5cfbd001f3a4d0e08a1 (patch) | |
tree | 871792866eddbd8faa402a86d056114749a79dcb /tests/unit_tests | |
parent | Merge pull request #6156 (diff) | |
download | monero-533d85d44baa480220ffa5cfbd001f3a4d0e08a1.tar.xz |
Fixed string_ref usage bug in epee::from_hex::vector
Diffstat (limited to 'tests/unit_tests')
-rw-r--r-- | tests/unit_tests/epee_utils.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/unit_tests/epee_utils.cpp b/tests/unit_tests/epee_utils.cpp index 6f887afda..a4b339295 100644 --- a/tests/unit_tests/epee_utils.cpp +++ b/tests/unit_tests/epee_utils.cpp @@ -840,6 +840,9 @@ TEST(FromHex, String) // decoding it this way also, ignoring spaces and colons between the numbers hex.assign("00:ff 0f:f0"); EXPECT_EQ(source, epee::from_hex::vector(hex)); + + hex.append("f0"); + EXPECT_EQ(source, epee::from_hex::vector(boost::string_ref{hex.data(), hex.size() - 2})); } TEST(ToHex, Array) |