aboutsummaryrefslogtreecommitdiffstats
path: root/util/memory/smallobj_ut.cpp
diff options
context:
space:
mode:
authorRuslan Kovalev <ruslan.a.kovalev@gmail.com>2022-02-10 16:46:44 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:44 +0300
commit59e19371de37995fcb36beb16cd6ec030af960bc (patch)
treefa68e36093ebff8b805462e9e6d331fe9d348214 /util/memory/smallobj_ut.cpp
parent89db6fe2fe2c32d2a832ddfeb04e8d078e301084 (diff)
downloadydb-59e19371de37995fcb36beb16cd6ec030af960bc.tar.gz
Restoring authorship annotation for Ruslan Kovalev <ruslan.a.kovalev@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'util/memory/smallobj_ut.cpp')
-rw-r--r--util/memory/smallobj_ut.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/util/memory/smallobj_ut.cpp b/util/memory/smallobj_ut.cpp
index 86003d1d53..6da02f0ecf 100644
--- a/util/memory/smallobj_ut.cpp
+++ b/util/memory/smallobj_ut.cpp
@@ -18,29 +18,29 @@ class TSmallObjAllocTest: public TTestBase {
};
struct TClass64: public TObjectFromPool<TClass64> {
- alignas(64) ui64 Data = 0;
- };
-
+ alignas(64) ui64 Data = 0;
+ };
+
UNIT_TEST_SUITE(TSmallObjAllocTest);
- UNIT_TEST(TestAlign)
- UNIT_TEST(TestError)
+ UNIT_TEST(TestAlign)
+ UNIT_TEST(TestError)
UNIT_TEST(TestAllocate)
UNIT_TEST_SUITE_END();
private:
- void TestAlign() {
- TClass64::TPool pool(TDefaultAllocator::Instance());
+ void TestAlign() {
+ TClass64::TPool pool(TDefaultAllocator::Instance());
TClass64* f1 = new (&pool) TClass64;
TClass64* f2 = new (&pool) TClass64;
TClass64* f3 = new (&pool) TClass64;
TClass64* f4 = new (&pool) TClass64;
- UNIT_ASSERT_VALUES_EQUAL(64u, alignof(TClass64));
- UNIT_ASSERT_VALUES_EQUAL((size_t)0, (size_t)(f1) & (alignof(TClass64) - 1));
- UNIT_ASSERT_VALUES_EQUAL((size_t)0, (size_t)(f2) & (alignof(TClass64) - 1));
- UNIT_ASSERT_VALUES_EQUAL((size_t)0, (size_t)(f3) & (alignof(TClass64) - 1));
- UNIT_ASSERT_VALUES_EQUAL((size_t)0, (size_t)(f4) & (alignof(TClass64) - 1));
- }
-
+ UNIT_ASSERT_VALUES_EQUAL(64u, alignof(TClass64));
+ UNIT_ASSERT_VALUES_EQUAL((size_t)0, (size_t)(f1) & (alignof(TClass64) - 1));
+ UNIT_ASSERT_VALUES_EQUAL((size_t)0, (size_t)(f2) & (alignof(TClass64) - 1));
+ UNIT_ASSERT_VALUES_EQUAL((size_t)0, (size_t)(f3) & (alignof(TClass64) - 1));
+ UNIT_ASSERT_VALUES_EQUAL((size_t)0, (size_t)(f4) & (alignof(TClass64) - 1));
+ }
+
inline void TestError() {
TErrClass::TPool pool(TDefaultAllocator::Instance());
TErrClass* f = new (&pool) TErrClass(false);