diff options
author | Ilnur Khuziev <ilnur.khuziev@yandex.ru> | 2022-02-10 16:46:14 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:14 +0300 |
commit | 60040c91ffe701a84689b2c6310ff845e65cff42 (patch) | |
tree | 1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util/generic/vector_ut.cpp | |
parent | 736dcd8ca259457a136f2f9f9168c44643914323 (diff) | |
download | ydb-60040c91ffe701a84689b2c6310ff845e65cff42.tar.gz |
Restoring authorship annotation for Ilnur Khuziev <ilnur.khuziev@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic/vector_ut.cpp')
-rw-r--r-- | util/generic/vector_ut.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/util/generic/vector_ut.cpp b/util/generic/vector_ut.cpp index be3cd24828..0f6b4037a0 100644 --- a/util/generic/vector_ut.cpp +++ b/util/generic/vector_ut.cpp @@ -1,6 +1,6 @@ #include "vector.h" -#include <library/cpp/testing/unittest/registar.h> +#include <library/cpp/testing/unittest/registar.h> #include <utility> #include "yexception.h" @@ -279,13 +279,13 @@ private: UNIT_ASSERT(v[5] == 25); UNIT_ASSERT(v[6] == 36); - size_t curCapacity = v.capacity(); + size_t curCapacity = v.capacity(); v.clear(); UNIT_ASSERT(v.empty()); - //check that clear save reserved data - UNIT_ASSERT_EQUAL(curCapacity, v.capacity()); - + //check that clear save reserved data + UNIT_ASSERT_EQUAL(curCapacity, v.capacity()); + v.insert(v.begin(), 5, 10); UNIT_ASSERT(v.size() == 5); UNIT_ASSERT(v[0] == 10); @@ -312,12 +312,12 @@ private: { TVector<int> v(Reserve(100)); - - UNIT_ASSERT(v.capacity() >= 100); - UNIT_ASSERT(v.size() == 0); - } - - { + + UNIT_ASSERT(v.capacity() >= 100); + UNIT_ASSERT(v.size() == 0); + } + + { //Test that used to generate an assertion when using __debug_alloc. TVector<TestStruct> va; va.reserve(1); |