mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:57:46 +00:00
AK: Make encode_base64 take a ByteBuffer and return a String
That makes the interface symmetric with decode_base64 and it's what all current callers want (except for one, which is buggy).
This commit is contained in:
parent
9e32ad6c99
commit
5ba8aba197
5 changed files with 15 additions and 13 deletions
|
@ -49,8 +49,8 @@ TEST_CASE(test_decode)
|
|||
TEST_CASE(test_encode)
|
||||
{
|
||||
auto encode_equal = [&](const char* input, const char* expected) {
|
||||
auto encoded = encode_base64(StringView(input));
|
||||
EXPECT(String::copy(encoded) == String(expected));
|
||||
auto encoded = encode_base64(ByteBuffer::wrap(input, strlen(input)));
|
||||
EXPECT(encoded == String(expected));
|
||||
};
|
||||
|
||||
encode_equal("", "");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue