diff options
author | swarmer <swarmer@yandex-team.ru> | 2022-02-10 16:46:31 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:31 +0300 |
commit | 317da38588b7898a99fd9168571408123350012b (patch) | |
tree | 25eebc31526019ad39a6c1b13f492963d97ba439 /library/cpp/containers/stack_vector/stack_vec_ut.cpp | |
parent | 3b2241461d41d41ba1a706b0750c4f0f55c344f6 (diff) | |
download | ydb-317da38588b7898a99fd9168571408123350012b.tar.gz |
Restoring authorship annotation for <swarmer@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/containers/stack_vector/stack_vec_ut.cpp')
-rw-r--r-- | library/cpp/containers/stack_vector/stack_vec_ut.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/library/cpp/containers/stack_vector/stack_vec_ut.cpp b/library/cpp/containers/stack_vector/stack_vec_ut.cpp index 19f9677781..bdb66f8c4f 100644 --- a/library/cpp/containers/stack_vector/stack_vec_ut.cpp +++ b/library/cpp/containers/stack_vector/stack_vec_ut.cpp @@ -9,16 +9,16 @@ namespace { static_assert(std::is_copy_constructible_v<TNotCopyAssignable>); static_assert(!std::is_copy_assignable_v<TNotCopyAssignable>); - - template <class T, size_t JunkPayloadSize> - struct TThickAlloc: public std::allocator<T> { - template <class U> - struct rebind { - using other = TThickAlloc<U, JunkPayloadSize>; - }; - - char Junk[JunkPayloadSize]{sizeof(T)}; - }; + + template <class T, size_t JunkPayloadSize> + struct TThickAlloc: public std::allocator<T> { + template <class U> + struct rebind { + using other = TThickAlloc<U, JunkPayloadSize>; + }; + + char Junk[JunkPayloadSize]{sizeof(T)}; + }; template <class T> struct TStatefulAlloc: public std::allocator<T> { @@ -126,12 +126,12 @@ Y_UNIT_TEST_SUITE(TStackBasedVectorTest) { } // Just verify that the program did not crash. } - - Y_UNIT_TEST(TestCustomAllocSize) { - constexpr size_t n = 16384; - using TVec = TStackVec<size_t, 1, true, TThickAlloc<size_t, n>>; - UNIT_ASSERT_LT(sizeof(TVec), 1.5 * n); - } + + Y_UNIT_TEST(TestCustomAllocSize) { + constexpr size_t n = 16384; + using TVec = TStackVec<size_t, 1, true, TThickAlloc<size_t, n>>; + UNIT_ASSERT_LT(sizeof(TVec), 1.5 * n); + } Y_UNIT_TEST(TestStatefulAlloc) { size_t count = 0; |