diff options
author | yazevnul <yazevnul@yandex-team.ru> | 2022-02-10 16:46:48 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:48 +0300 |
commit | 9abfb1a53b7f7b791444d1378e645d8fad9b06ed (patch) | |
tree | 49e222ea1c5804306084bb3ae065bb702625360f /util/generic/xrange_ut.cpp | |
parent | 8cbc307de0221f84c80c42dcbe07d40727537e2c (diff) | |
download | ydb-9abfb1a53b7f7b791444d1378e645d8fad9b06ed.tar.gz |
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic/xrange_ut.cpp')
-rw-r--r-- | util/generic/xrange_ut.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/util/generic/xrange_ut.cpp b/util/generic/xrange_ut.cpp index d0a43637cf..8106da03e7 100644 --- a/util/generic/xrange_ut.cpp +++ b/util/generic/xrange_ut.cpp @@ -6,7 +6,7 @@ #include <library/cpp/testing/unittest/registar.h> #include <util/string/builder.h> -Y_UNIT_TEST_SUITE(XRange) { +Y_UNIT_TEST_SUITE(XRange) { void TestXRangeImpl(size_t begin, size_t end) { size_t count = 0; size_t sum = 0; @@ -40,18 +40,18 @@ Y_UNIT_TEST_SUITE(XRange) { UNIT_ASSERT_VALUES_EQUAL(expInd, expected.size()); } - Y_UNIT_TEST(IncrementWorks) { + Y_UNIT_TEST(IncrementWorks) { TestXRangeImpl(0, 10); TestXRangeImpl(10, 20); } - Y_UNIT_TEST(DecrementWorks) { + 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}); } - Y_UNIT_TEST(StepWorks) { + Y_UNIT_TEST(StepWorks) { TestSteppedXRangeImpl(0, 0, 1, {}); TestSteppedXRangeImpl(0, 9, 3, {0, 3, 6}); TestSteppedXRangeImpl(0, 10, 3, {0, 3, 6, 9}); @@ -64,7 +64,7 @@ Y_UNIT_TEST_SUITE(XRange) { TestSteppedXRangeImpl(15, -2, -4, {15, 11, 7, 3, -1}); } - Y_UNIT_TEST(PointersWorks) { + Y_UNIT_TEST(PointersWorks) { TVector<size_t> data = {3, 1, 4, 1, 5, 9, 2, 6}; const size_t digSumExpected = Accumulate(data.begin(), data.end(), static_cast<size_t>(0)); size_t digSumByIt = 0; @@ -79,7 +79,7 @@ Y_UNIT_TEST_SUITE(XRange) { UNIT_ASSERT_VALUES_EQUAL(digSumByPtr, digSumExpected); } - Y_UNIT_TEST(SizeMethodCheck) { + Y_UNIT_TEST(SizeMethodCheck) { UNIT_ASSERT_VALUES_EQUAL(xrange(5).size(), 5); UNIT_ASSERT_VALUES_EQUAL(xrange(0, 5, 2).size(), 3); UNIT_ASSERT_VALUES_EQUAL(xrange(0, 6, 2).size(), 3); @@ -94,7 +94,7 @@ Y_UNIT_TEST_SUITE(XRange) { } }; - Y_UNIT_TEST(ConvertionWorks) { + Y_UNIT_TEST(ConvertionWorks) { TVector<size_t> data = {0, 1, 2, 3, 4, 5, 6, 7, 8}; TVector<size_t> convertionResults[] = {xrange<size_t>(9), @@ -119,7 +119,7 @@ Y_UNIT_TEST_SUITE(XRange) { UNIT_ASSERT_VALUES_EQUAL(emptyRange.size(), 0); for (auto i : emptyRange) { - Y_UNUSED(i); + Y_UNUSED(i); UNIT_ASSERT(false); } @@ -129,7 +129,7 @@ Y_UNIT_TEST_SUITE(XRange) { } } - Y_UNIT_TEST(EmptySimpleRange) { + Y_UNIT_TEST(EmptySimpleRange) { using TSimpleRange = decltype(xrange(1)); const TSimpleRange emptySimpleRanges[] = { @@ -143,7 +143,7 @@ Y_UNIT_TEST_SUITE(XRange) { TestEmptyRanges(emptySimpleRanges); } - Y_UNIT_TEST(EmptySteppedRange) { + Y_UNIT_TEST(EmptySteppedRange) { using TSteppedRange = decltype(xrange(1, 10, 1)); const TSteppedRange emptySteppedRanges[] = { |