diff options
author | samoylovboris <samoylovboris@yandex-team.ru> | 2022-02-10 16:49:56 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:56 +0300 |
commit | 1cefd0c80e17cf625858624e103f07eb08f7b1b2 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/string_utils/base64 | |
parent | b1a065aac47f61f2d8e3670ace40bd939af406f9 (diff) | |
download | ydb-1cefd0c80e17cf625858624e103f07eb08f7b1b2.tar.gz |
Restoring authorship annotation for <samoylovboris@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/string_utils/base64')
-rw-r--r-- | library/cpp/string_utils/base64/base64_ut.cpp | 36 | ||||
-rw-r--r-- | library/cpp/string_utils/base64/ya.make | 4 |
2 files changed, 20 insertions, 20 deletions
diff --git a/library/cpp/string_utils/base64/base64_ut.cpp b/library/cpp/string_utils/base64/base64_ut.cpp index f7807ed9b5..bcc1e65879 100644 --- a/library/cpp/string_utils/base64/base64_ut.cpp +++ b/library/cpp/string_utils/base64/base64_ut.cpp @@ -267,24 +267,24 @@ Y_UNIT_TEST_SUITE(TBase64) { UNIT_ASSERT_EXCEPTION(Base64StrictDecode("\1\1\1\2"), yexception); } - Y_UNIT_TEST(TestDecodeUneven) { - UNIT_ASSERT_VALUES_EQUAL(Base64DecodeUneven(""), ""); - - UNIT_ASSERT_VALUES_EQUAL(Base64DecodeUneven("YWFh"), "aaa"); - - UNIT_ASSERT_VALUES_EQUAL(Base64DecodeUneven("MTI="), "12"); - UNIT_ASSERT_VALUES_EQUAL(Base64DecodeUneven("MTI,"), "12"); - UNIT_ASSERT_VALUES_EQUAL(Base64DecodeUneven("MTI"), "12"); - - UNIT_ASSERT_VALUES_EQUAL(Base64DecodeUneven("QQ=="), "A"); - UNIT_ASSERT_VALUES_EQUAL(Base64DecodeUneven("QQ,,"), "A"); - UNIT_ASSERT_VALUES_EQUAL(Base64DecodeUneven("QQ"), "A"); - - UNIT_ASSERT_VALUES_EQUAL(Base64DecodeUneven("dnluZHg="), "vyndx"); - UNIT_ASSERT_VALUES_EQUAL(Base64DecodeUneven("dnluZHg,"), "vyndx"); - UNIT_ASSERT_VALUES_EQUAL(Base64DecodeUneven("dnluZHg"), "vyndx"); - } - + Y_UNIT_TEST(TestDecodeUneven) { + UNIT_ASSERT_VALUES_EQUAL(Base64DecodeUneven(""), ""); + + UNIT_ASSERT_VALUES_EQUAL(Base64DecodeUneven("YWFh"), "aaa"); + + UNIT_ASSERT_VALUES_EQUAL(Base64DecodeUneven("MTI="), "12"); + UNIT_ASSERT_VALUES_EQUAL(Base64DecodeUneven("MTI,"), "12"); + UNIT_ASSERT_VALUES_EQUAL(Base64DecodeUneven("MTI"), "12"); + + UNIT_ASSERT_VALUES_EQUAL(Base64DecodeUneven("QQ=="), "A"); + UNIT_ASSERT_VALUES_EQUAL(Base64DecodeUneven("QQ,,"), "A"); + UNIT_ASSERT_VALUES_EQUAL(Base64DecodeUneven("QQ"), "A"); + + UNIT_ASSERT_VALUES_EQUAL(Base64DecodeUneven("dnluZHg="), "vyndx"); + UNIT_ASSERT_VALUES_EQUAL(Base64DecodeUneven("dnluZHg,"), "vyndx"); + UNIT_ASSERT_VALUES_EQUAL(Base64DecodeUneven("dnluZHg"), "vyndx"); + } + Y_UNIT_TEST(TestDecodeRandom) { TString input; constexpr size_t testSize = 240000; diff --git a/library/cpp/string_utils/base64/ya.make b/library/cpp/string_utils/base64/ya.make index 43899cf12b..f5258c446c 100644 --- a/library/cpp/string_utils/base64/ya.make +++ b/library/cpp/string_utils/base64/ya.make @@ -19,5 +19,5 @@ PEERDIR( ) END() - -RECURSE_FOR_TESTS(ut) + +RECURSE_FOR_TESTS(ut) |