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
commit8e9b2f8bbf4a2320f539eef5b85555f42c065425 (patch)
tree189a13fe5128c85492e45518171a532ffa90ba03 /util/generic/adaptor_ut.cpp
parent92040fb3ad117c48c87d591bf9fe916ffda61233 (diff)
downloadydb-8e9b2f8bbf4a2320f539eef5b85555f42c065425.tar.gz
Restoring authorship annotation for <pechatnov@yandex-team.ru>. Commit 1 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 721f849f93..ff980632b4 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);
+ }
+ }
}