aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorgrand <grand@yandex-team.ru>2022-02-10 16:50:07 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:07 +0300
commita0e29f0026d32a60a618a620f30035c264346175 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /util
parent7eb3862cccdb866e7e739123c8024ccec628bb62 (diff)
downloadydb-a0e29f0026d32a60a618a620f30035c264346175.tar.gz
Restoring authorship annotation for <grand@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util')
-rw-r--r--util/generic/bitmap_ut.cpp2
-rw-r--r--util/generic/typelist.h4
-rw-r--r--util/generic/typetraits_ut.cpp12
-rw-r--r--util/generic/xrange_ut.cpp26
-rw-r--r--util/string/join.h8
-rw-r--r--util/string/join_ut.cpp2
6 files changed, 27 insertions, 27 deletions
diff --git a/util/generic/bitmap_ut.cpp b/util/generic/bitmap_ut.cpp
index ff3ef9f840..087d34a8dc 100644
--- a/util/generic/bitmap_ut.cpp
+++ b/util/generic/bitmap_ut.cpp
@@ -529,7 +529,7 @@ Y_UNIT_TEST_SUITE(TBitMapTest) {
}
Y_UNIT_TEST(TestHashMixed) {
- static_assert((std::is_same<TDynBitMap::TChunk, ui64>::value), "expect (TSameType<TDynBitMap::TChunk, ui64>::Result)");
+ static_assert((std::is_same<TDynBitMap::TChunk, ui64>::value), "expect (TSameType<TDynBitMap::TChunk, ui64>::Result)");
TBitMap<sizeof(ui64) * 16, ui64> bitmapFixed;
TDynBitMap bitmapDynamic;
diff --git a/util/generic/typelist.h b/util/generic/typelist.h
index c162a38bbf..5ce26ab97c 100644
--- a/util/generic/typelist.h
+++ b/util/generic/typelist.h
@@ -4,8 +4,8 @@
#include <util/generic/typetraits.h>
-#include <type_traits>
-
+#include <type_traits>
+
template <class... R>
struct TTypeList;
diff --git a/util/generic/typetraits_ut.cpp b/util/generic/typetraits_ut.cpp
index 5568aea7c2..e7571c75ec 100644
--- a/util/generic/typetraits_ut.cpp
+++ b/util/generic/typetraits_ut.cpp
@@ -72,10 +72,10 @@ namespace {
};
}
-#define ASSERT_SAME_TYPE(x, y) \
- { \
- const bool x_ = std::is_same<x, y>::value; \
- UNIT_ASSERT_C(x_, #x " != " #y); \
+#define ASSERT_SAME_TYPE(x, y) \
+ { \
+ const bool x_ = std::is_same<x, y>::value; \
+ UNIT_ASSERT_C(x_, #x " != " #y); \
}
Y_UNIT_TEST_SUITE(TTypeTraitsTest) {
@@ -132,9 +132,9 @@ Y_UNIT_TEST_SUITE(TTypeTraitsTest) {
bool a;
- a = std::is_same<typename TTypeTraits<T>::TFuncParam, T>::value;
+ a = std::is_same<typename TTypeTraits<T>::TFuncParam, T>::value;
UNIT_ASSERT(a);
- a = std::is_same<typename TTypeTraits<const volatile T>::TFuncParam, const volatile T>::value;
+ a = std::is_same<typename TTypeTraits<const volatile T>::TFuncParam, const volatile T>::value;
UNIT_ASSERT(a);
}
diff --git a/util/generic/xrange_ut.cpp b/util/generic/xrange_ut.cpp
index 4575030792..8106da03e7 100644
--- a/util/generic/xrange_ut.cpp
+++ b/util/generic/xrange_ut.cpp
@@ -46,22 +46,22 @@ Y_UNIT_TEST_SUITE(XRange) {
}
Y_UNIT_TEST(DecrementWorks) {
- TestSteppedXRangeImpl(10, 0, -1, {10, 9, 8, 7, 6, 5, 4, 3, 2, 1});
- TestSteppedXRangeImpl(10, -1, -1, {10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0});
- TestSteppedXRangeImpl(20, 9, -1, {20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10});
+ TestSteppedXRangeImpl(10, 0, -1, {10, 9, 8, 7, 6, 5, 4, 3, 2, 1});
+ TestSteppedXRangeImpl(10, -1, -1, {10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0});
+ TestSteppedXRangeImpl(20, 9, -1, {20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10});
}
Y_UNIT_TEST(StepWorks) {
- TestSteppedXRangeImpl(0, 0, 1, {});
- TestSteppedXRangeImpl(0, 9, 3, {0, 3, 6});
- TestSteppedXRangeImpl(0, 10, 3, {0, 3, 6, 9});
- TestSteppedXRangeImpl(0, 11, 3, {0, 3, 6, 9});
- TestSteppedXRangeImpl(0, 12, 3, {0, 3, 6, 9});
- TestSteppedXRangeImpl(0, 13, 3, {0, 3, 6, 9, 12});
- TestSteppedXRangeImpl(0, 10, 2, {0, 2, 4, 6, 8});
- TestSteppedXRangeImpl(15, 0, -4, {15, 11, 7, 3});
- TestSteppedXRangeImpl(15, -1, -4, {15, 11, 7, 3});
- TestSteppedXRangeImpl(15, -2, -4, {15, 11, 7, 3, -1});
+ TestSteppedXRangeImpl(0, 0, 1, {});
+ TestSteppedXRangeImpl(0, 9, 3, {0, 3, 6});
+ TestSteppedXRangeImpl(0, 10, 3, {0, 3, 6, 9});
+ TestSteppedXRangeImpl(0, 11, 3, {0, 3, 6, 9});
+ TestSteppedXRangeImpl(0, 12, 3, {0, 3, 6, 9});
+ TestSteppedXRangeImpl(0, 13, 3, {0, 3, 6, 9, 12});
+ TestSteppedXRangeImpl(0, 10, 2, {0, 2, 4, 6, 8});
+ TestSteppedXRangeImpl(15, 0, -4, {15, 11, 7, 3});
+ TestSteppedXRangeImpl(15, -1, -4, {15, 11, 7, 3});
+ TestSteppedXRangeImpl(15, -2, -4, {15, 11, 7, 3, -1});
}
Y_UNIT_TEST(PointersWorks) {
diff --git a/util/string/join.h b/util/string/join.h
index 9d9479b1c2..b166fad1f3 100644
--- a/util/string/join.h
+++ b/util/string/join.h
@@ -173,7 +173,7 @@ inline TBasicString<TCharType> JoinSeq(std::basic_string_view<TCharType> delim,
using std::end;
return JoinRange(delim, begin(data), end(data));
}
-
+
template <typename TCharType, typename TContainer>
inline TBasicString<TCharType> JoinSeq(const TCharType* delim, const TContainer& data) {
TBasicStringBuf<TCharType> delimBuf = delim;
@@ -252,13 +252,13 @@ constexpr auto MakeRangeJoiner(TStringBuf delim, const std::initializer_list<TVa
* If someone needs to join std::initializer_list<TString> -- it still works because of the TContainer template above.
*/
-template <typename T>
+template <typename T>
inline std::enable_if_t<
!std::is_same<std::decay_t<T>, TString>::value && !std::is_same<std::decay_t<T>, const char*>::value,
TString>
JoinSeq(const TStringBuf delim, const std::initializer_list<T>& data) {
- return JoinRange(delim, data.begin(), data.end());
-}
+ return JoinRange(delim, data.begin(), data.end());
+}
inline TString JoinSeq(const TStringBuf delim, const std::initializer_list<TStringBuf>& data) {
return JoinRange(delim, data.begin(), data.end());
diff --git a/util/string/join_ut.cpp b/util/string/join_ut.cpp
index d69442d18b..3ed2b2459c 100644
--- a/util/string/join_ut.cpp
+++ b/util/string/join_ut.cpp
@@ -34,7 +34,7 @@ Y_UNIT_TEST_SUITE(JoinStringTest) {
UNIT_ASSERT_EQUAL(JoinRange(" ", v, v + 2), "1 2");
UNIT_ASSERT_EQUAL(JoinSeq(" ", {}), "");
UNIT_ASSERT_EQUAL(JoinSeq(" ", {42}), "42");
- UNIT_ASSERT_EQUAL(JoinSeq(" ", {1, 2, 3}), "1 2 3");
+ UNIT_ASSERT_EQUAL(JoinSeq(" ", {1, 2, 3}), "1 2 3");
UNIT_ASSERT_VALUES_EQUAL(JoinSeq(" ", v), "1 2 3");
}