aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsamoylovboris <samoylovboris@yandex-team.ru>2022-02-10 16:49:56 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:56 +0300
commitb1a065aac47f61f2d8e3670ace40bd939af406f9 (patch)
tree5bc8bb26dba963009dd047e185fc896aea36cdc3
parent149d2fda2c7501b0e9f26325f72aaec213e93611 (diff)
downloadydb-b1a065aac47f61f2d8e3670ace40bd939af406f9.tar.gz
Restoring authorship annotation for <samoylovboris@yandex-team.ru>. Commit 1 of 2.
-rw-r--r--library/cpp/containers/comptrie/search_iterator.h30
-rw-r--r--library/cpp/string_utils/base64/base64_ut.cpp36
-rw-r--r--library/cpp/string_utils/base64/ya.make4
3 files changed, 35 insertions, 35 deletions
diff --git a/library/cpp/containers/comptrie/search_iterator.h b/library/cpp/containers/comptrie/search_iterator.h
index 247f7e5936..07dcc75921 100644
--- a/library/cpp/containers/comptrie/search_iterator.h
+++ b/library/cpp/containers/comptrie/search_iterator.h
@@ -41,17 +41,17 @@ public:
{
}
- bool operator==(const TSearchIterator& other) const {
+ bool operator==(const TSearchIterator& other) const {
Y_ASSERT(Trie && other.Trie);
- return Trie == other.Trie &&
- DataPos == other.DataPos &&
- DataEnd == other.DataEnd &&
- ValuePos == other.ValuePos;
- }
- bool operator!=(const TSearchIterator& other) const {
- return !(*this == other);
- }
-
+ return Trie == other.Trie &&
+ DataPos == other.DataPos &&
+ DataEnd == other.DataEnd &&
+ ValuePos == other.ValuePos;
+ }
+ bool operator!=(const TSearchIterator& other) const {
+ return !(*this == other);
+ }
+
inline bool Advance(TSymbol label) {
Y_ASSERT(Trie);
if (DataPos == nullptr || DataPos >= DataEnd) {
@@ -132,9 +132,9 @@ bool TSearchIterator<TTrie>::HasValue() const {
template <class TTrie>
inline size_t TSearchIterator<TTrie>::GetHash() const {
Y_ASSERT(Trie);
- return MultiHash(
- static_cast<const void*>(Trie),
- static_cast<const void*>(DataPos),
- static_cast<const void*>(DataEnd),
- static_cast<const void*>(ValuePos));
+ return MultiHash(
+ static_cast<const void*>(Trie),
+ static_cast<const void*>(DataPos),
+ static_cast<const void*>(DataEnd),
+ static_cast<const void*>(ValuePos));
}
diff --git a/library/cpp/string_utils/base64/base64_ut.cpp b/library/cpp/string_utils/base64/base64_ut.cpp
index bcc1e65879..f7807ed9b5 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 f5258c446c..43899cf12b 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)