aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhanna14 <hanna14@yandex-team.ru>2022-02-10 16:50:53 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:53 +0300
commitde7ec58e0cb13a88eb94ea670176aa4c7f2802dc (patch)
tree742a3b25c0f6c48aebcf83ba8d61d6e8a5e36014
parent0093f1ac39402a8aaf5ae7edc5e83a4de7771335 (diff)
downloadydb-de7ec58e0cb13a88eb94ea670176aa4c7f2802dc.tar.gz
Restoring authorship annotation for <hanna14@yandex-team.ru>. Commit 1 of 2.
-rw-r--r--library/cpp/archive/yarchive.cpp4
-rw-r--r--library/cpp/archive/yarchive_ut.cpp48
2 files changed, 26 insertions, 26 deletions
diff --git a/library/cpp/archive/yarchive.cpp b/library/cpp/archive/yarchive.cpp
index 1becc3e5da..514456fc18 100644
--- a/library/cpp/archive/yarchive.cpp
+++ b/library/cpp/archive/yarchive.cpp
@@ -1,6 +1,6 @@
#include "yarchive.h"
-#include <util/generic/algorithm.h>
+#include <util/generic/algorithm.h>
#include <util/generic/hash.h>
#include <util/generic/utility.h>
#include <util/generic/vector.h>
@@ -289,7 +289,7 @@ public:
}
Sort(Recs_.begin(), Recs_.end(), [](const auto& lhs, const auto& rhs) -> bool {
return lhs->Offset() < rhs->Offset();
- });
+ });
try {
UseDecompression = static_cast<bool>(ESLoad<ui8>(&d));
diff --git a/library/cpp/archive/yarchive_ut.cpp b/library/cpp/archive/yarchive_ut.cpp
index 602a1cdbbd..d308a74b12 100644
--- a/library/cpp/archive/yarchive_ut.cpp
+++ b/library/cpp/archive/yarchive_ut.cpp
@@ -11,21 +11,21 @@ class TArchiveTest: public TTestBase {
UNIT_TEST_SUITE(TArchiveTest)
UNIT_TEST(TestCreate);
UNIT_TEST(TestRead);
- UNIT_TEST(TestOffsetOrder);
+ UNIT_TEST(TestOffsetOrder);
UNIT_TEST_SUITE_END();
private:
- void CreateArchive();
+ void CreateArchive();
void TestCreate();
void TestRead();
- void TestOffsetOrder();
+ void TestOffsetOrder();
};
UNIT_TEST_SUITE_REGISTRATION(TArchiveTest);
#define ARCHIVE "./test.ar"
-void TArchiveTest::CreateArchive() {
+void TArchiveTest::CreateArchive() {
TFixedBufferFileOutput out(ARCHIVE);
TArchiveWriter w(&out);
@@ -41,13 +41,13 @@ void TArchiveTest::CreateArchive() {
out.Finish();
}
-void TArchiveTest::TestCreate() {
- CreateArchive();
- TTempFile tmpFile(ARCHIVE);
-}
-
+void TArchiveTest::TestCreate() {
+ CreateArchive();
+ TTempFile tmpFile(ARCHIVE);
+}
+
void TArchiveTest::TestRead() {
- CreateArchive();
+ CreateArchive();
TTempFile tmpFile(ARCHIVE);
TBlob blob = TBlob::FromFileSingleThreaded(ARCHIVE);
TArchiveReader r(blob);
@@ -62,23 +62,23 @@ void TArchiveTest::TestRead() {
UNIT_ASSERT_EQUAL(data, "data" + ToString(i * 1000) + "dataend");
}
}
-
-void TArchiveTest::TestOffsetOrder() {
- CreateArchive();
- TTempFile tmpFile(ARCHIVE);
+
+void TArchiveTest::TestOffsetOrder() {
+ CreateArchive();
+ TTempFile tmpFile(ARCHIVE);
TBlob blob1 = TBlob::FromFileSingleThreaded(ARCHIVE);
TArchiveReader r(blob1);
-
+
const void* prevOffset = nullptr;
-
- for (size_t i = 0; i < r.Count(); ++i) {
+
+ for (size_t i = 0; i < r.Count(); ++i) {
const TString key = r.KeyByIndex(i);
TBlob blob2 = r.BlobByKey(key);
const void* offset = blob2.Data();
-
- if (i) {
- UNIT_ASSERT(prevOffset < offset);
- }
- prevOffset = offset;
- }
-}
+
+ if (i) {
+ UNIT_ASSERT(prevOffset < offset);
+ }
+ prevOffset = offset;
+ }
+}