diff options
| author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-08-27 08:43:56 +0000 |
|---|---|---|
| committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-09-12 09:26:09 +0000 |
| commit | 07ec748c8245b42de0ec9964b2f0062c0034f2f8 (patch) | |
| tree | 7e7cd85956f83c779f63afc2b6ecddbefbb30fd1 /tests | |
| parent | 91c7d68b2d476c86e8ba710ccac6f3c64b91f1a5 (diff) | |
| download | monzero-core-07ec748c8245b42de0ec9964b2f0062c0034f2f8.tar.gz monzero-core-07ec748c8245b42de0ec9964b2f0062c0034f2f8.tar.xz monzero-core-07ec748c8245b42de0ec9964b2f0062c0034f2f8.zip | |
wipeable_string: add hex_to_pod function
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/unit_tests/wipeable_string.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/unit_tests/wipeable_string.cpp b/tests/unit_tests/wipeable_string.cpp index 5ea1c1729..65718fd45 100644 --- a/tests/unit_tests/wipeable_string.cpp +++ b/tests/unit_tests/wipeable_string.cpp @@ -32,6 +32,7 @@ #include "misc_log_ex.h" #include "wipeable_string.h" +#include "hex.h" TEST(wipeable_string, ctor) { @@ -202,3 +203,9 @@ TEST(wipeable_string, parse_hexstr) ASSERT_TRUE((s = epee::wipeable_string("414243").parse_hexstr())); ASSERT_EQ(*s, epee::wipeable_string("ABC")); } + +TEST(wipeable_string, to_hex) +{ + ASSERT_TRUE(epee::to_hex::wipeable_string(epee::span<const uint8_t>((const uint8_t*)"", 0)) == epee::wipeable_string("")); + ASSERT_TRUE(epee::to_hex::wipeable_string(epee::span<const uint8_t>((const uint8_t*)"abc", 3)) == epee::wipeable_string("616263")); +} |
