mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
Use std::string_view throughout util strencodings/string
This commit is contained in:
parent
8ffbd1412d
commit
e7d2fbda63
9 changed files with 69 additions and 56 deletions
|
|
@ -26,7 +26,7 @@ FUZZ_TARGET_INIT(base_encode_decode, initialize_base_encode_decode)
|
|||
std::vector<unsigned char> decoded;
|
||||
if (DecodeBase58(random_encoded_string, decoded, 100)) {
|
||||
const std::string encoded_string = EncodeBase58(decoded);
|
||||
assert(encoded_string == TrimString(encoded_string));
|
||||
assert(encoded_string == TrimStringView(encoded_string));
|
||||
assert(ToLower(encoded_string) == ToLower(TrimString(random_encoded_string)));
|
||||
}
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ FUZZ_TARGET_INIT(base_encode_decode, initialize_base_encode_decode)
|
|||
auto result = DecodeBase32(random_encoded_string);
|
||||
if (result) {
|
||||
const std::string encoded_string = EncodeBase32(*result);
|
||||
assert(encoded_string == TrimString(encoded_string));
|
||||
assert(encoded_string == TrimStringView(encoded_string));
|
||||
assert(ToLower(encoded_string) == ToLower(TrimString(random_encoded_string)));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue