diff options
author | grand <grand@yandex-team.ru> | 2022-02-10 16:50:06 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:06 +0300 |
commit | 7eb3862cccdb866e7e739123c8024ccec628bb62 (patch) | |
tree | 5ce974787810a396bb1c1cca605feef8f9e85679 /util | |
parent | 13dbd0acb78595551b843005d6bd021bdc1a859b (diff) | |
download | ydb-7eb3862cccdb866e7e739123c8024ccec628bb62.tar.gz |
Restoring authorship annotation for <grand@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util')
-rw-r--r-- | util/generic/bitmap_ut.cpp | 2 | ||||
-rw-r--r-- | util/generic/typelist.h | 4 | ||||
-rw-r--r-- | util/generic/typetraits_ut.cpp | 12 | ||||
-rw-r--r-- | util/generic/xrange_ut.cpp | 26 | ||||
-rw-r--r-- | util/string/join.h | 8 | ||||
-rw-r--r-- | util/string/join_ut.cpp | 2 |
6 files changed, 27 insertions, 27 deletions
diff --git a/util/generic/bitmap_ut.cpp b/util/generic/bitmap_ut.cpp index 087d34a8dc..ff3ef9f840 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 5ce26ab97c..c162a38bbf 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 e7571c75ec..5568aea7c2 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 8106da03e7..4575030792 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 b166fad1f3..9d9479b1c2 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 3ed2b2459c..d69442d18b 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"); } |