aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/adaptor_ut.cpp
diff options
context:
space:
mode:
authorpechatnov <pechatnov@yandex-team.ru>2022-02-10 16:48:57 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:57 +0300
commit132a3640fac343164b858d0a914e020a848a2848 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /util/generic/adaptor_ut.cpp
parent8e9b2f8bbf4a2320f539eef5b85555f42c065425 (diff)
downloadydb-132a3640fac343164b858d0a914e020a848a2848.tar.gz
Restoring authorship annotation for <pechatnov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic/adaptor_ut.cpp')
-rw-r--r--util/generic/adaptor_ut.cpp100
1 files changed, 50 insertions, 50 deletions
diff --git a/util/generic/adaptor_ut.cpp b/util/generic/adaptor_ut.cpp
index ff980632b4..721f849f93 100644
--- a/util/generic/adaptor_ut.cpp
+++ b/util/generic/adaptor_ut.cpp
@@ -40,10 +40,10 @@ Y_UNIT_TEST_SUITE(TReverseAdaptor) {
for (const auto& x : Reversed(cont)) {
UNIT_ASSERT_VALUES_EQUAL(etalon[idx++], x);
}
- idx = 0;
- for (const auto& x : Reversed(std::move(cont))) {
- UNIT_ASSERT_VALUES_EQUAL(etalon[idx++], x);
- }
+ idx = 0;
+ for (const auto& x : Reversed(std::move(cont))) {
+ UNIT_ASSERT_VALUES_EQUAL(etalon[idx++], x);
+ }
}
Y_UNIT_TEST(WriteTest) {
@@ -75,50 +75,50 @@ Y_UNIT_TEST_SUITE(TReverseAdaptor) {
UNIT_ASSERT_NO_EXCEPTION(Reversed(lvalue));
UNIT_ASSERT_NO_EXCEPTION(Reversed(clvalue));
}
-
- Y_UNIT_TEST(ReverseX2Test) {
- TVector<int> cont = {1, 2, 3};
- size_t idx = 0;
- for (const auto& x : Reversed(Reversed(cont))) {
- UNIT_ASSERT_VALUES_EQUAL(cont[idx++], x);
- }
- }
-
- Y_UNIT_TEST(ReverseX3Test) {
- TVector<int> cont = {1, 2, 3};
- TVector<int> etalon = {3, 2, 1};
- size_t idx = 0;
- for (const auto& x : Reversed(Reversed(Reversed(cont)))) {
- UNIT_ASSERT_VALUES_EQUAL(etalon[idx++], x);
- }
- }
-
- Y_UNIT_TEST(ReverseTemporaryTest) {
- TVector<int> etalon = {3, 2, 1};
- TVector<int> etalon2 = {1, 2, 3};
- size_t idx = 0;
- for (const auto& x : Reversed(TVector<int>{1, 2, 3})) {
- UNIT_ASSERT_VALUES_EQUAL(etalon[idx++], x);
- }
- idx = 0;
- for (const auto& x : Reversed(Reversed(TVector<int>{1, 2, 3}))) {
- UNIT_ASSERT_VALUES_EQUAL(etalon2[idx++], x);
- }
- }
-
- Y_UNIT_TEST(ReverseInitializerListTest) {
- // initializer_list has no rbegin and rend
- auto cont = {1, 2, 3};
- TVector<int> etalon = {3, 2, 1};
- TVector<int> etalon2 = {1, 2, 3};
-
- size_t idx = 0;
- for (const auto& x : Reversed(cont)) {
- UNIT_ASSERT_VALUES_EQUAL(etalon[idx++], x);
- }
- idx = 0;
- for (const auto& x : Reversed(Reversed(cont))) {
- UNIT_ASSERT_VALUES_EQUAL(etalon2[idx++], x);
- }
- }
+
+ Y_UNIT_TEST(ReverseX2Test) {
+ TVector<int> cont = {1, 2, 3};
+ size_t idx = 0;
+ for (const auto& x : Reversed(Reversed(cont))) {
+ UNIT_ASSERT_VALUES_EQUAL(cont[idx++], x);
+ }
+ }
+
+ Y_UNIT_TEST(ReverseX3Test) {
+ TVector<int> cont = {1, 2, 3};
+ TVector<int> etalon = {3, 2, 1};
+ size_t idx = 0;
+ for (const auto& x : Reversed(Reversed(Reversed(cont)))) {
+ UNIT_ASSERT_VALUES_EQUAL(etalon[idx++], x);
+ }
+ }
+
+ Y_UNIT_TEST(ReverseTemporaryTest) {
+ TVector<int> etalon = {3, 2, 1};
+ TVector<int> etalon2 = {1, 2, 3};
+ size_t idx = 0;
+ for (const auto& x : Reversed(TVector<int>{1, 2, 3})) {
+ UNIT_ASSERT_VALUES_EQUAL(etalon[idx++], x);
+ }
+ idx = 0;
+ for (const auto& x : Reversed(Reversed(TVector<int>{1, 2, 3}))) {
+ UNIT_ASSERT_VALUES_EQUAL(etalon2[idx++], x);
+ }
+ }
+
+ Y_UNIT_TEST(ReverseInitializerListTest) {
+ // initializer_list has no rbegin and rend
+ auto cont = {1, 2, 3};
+ TVector<int> etalon = {3, 2, 1};
+ TVector<int> etalon2 = {1, 2, 3};
+
+ size_t idx = 0;
+ for (const auto& x : Reversed(cont)) {
+ UNIT_ASSERT_VALUES_EQUAL(etalon[idx++], x);
+ }
+ idx = 0;
+ for (const auto& x : Reversed(Reversed(cont))) {
+ UNIT_ASSERT_VALUES_EQUAL(etalon2[idx++], x);
+ }
+ }
}