diff options
author | glebx777 <glebx777@yandex-team.ru> | 2022-02-10 16:49:44 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:44 +0300 |
commit | ab9150ae9d81b97b19a2a6a8b903f9a40791c8b4 (patch) | |
tree | ff7ea20bcb3779c1ae74319692b5b48686d480cc /util/generic/yexception_ut.cpp | |
parent | 5a8cb97e0064c6b1afe060dc7a4a7c9c0eb879be (diff) | |
download | ydb-ab9150ae9d81b97b19a2a6a8b903f9a40791c8b4.tar.gz |
Restoring authorship annotation for <glebx777@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/generic/yexception_ut.cpp')
-rw-r--r-- | util/generic/yexception_ut.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/util/generic/yexception_ut.cpp b/util/generic/yexception_ut.cpp index cb3e29fed8..a724c7dcdb 100644 --- a/util/generic/yexception_ut.cpp +++ b/util/generic/yexception_ut.cpp @@ -11,8 +11,8 @@ static inline void Throw2DontMove() { #include <library/cpp/testing/unittest/registar.h> #include <util/generic/algorithm.h> -#include <util/memory/tempbuf.h> -#include <util/random/mersenne.h> +#include <util/memory/tempbuf.h> +#include <util/random/mersenne.h> #include <util/stream/output.h> #include <util/string/subst.h> @@ -50,7 +50,7 @@ class TExceptionTest: public TTestBase { UNIT_TEST(TestEnsureWithBackTrace2) UNIT_TEST(TestRethrowAppend) UNIT_TEST(TestMacroOverload) - UNIT_TEST(TestMessageCrop) + UNIT_TEST(TestMessageCrop) UNIT_TEST(TestTIoSystemErrorSpecialMethods) UNIT_TEST(TestCurrentExceptionTypeNameMethod) UNIT_TEST_SUITE_END(); @@ -280,22 +280,22 @@ private: UNIT_ASSERT(e.AsStrBuf().Contains("10 > 20")); } } - - void TestMessageCrop() { - TTempBuf tmp; - size_t size = tmp.Size() * 1.5; - TString s; - s.reserve(size); - TMersenne<ui64> generator(42); - for (int j = 0; j < 50; ++j) { - for (size_t i = 0; i < size; ++i) { - s += static_cast<char>('a' + generator() % 26); - } - yexception e; - e << s; + + void TestMessageCrop() { + TTempBuf tmp; + size_t size = tmp.Size() * 1.5; + TString s; + s.reserve(size); + TMersenne<ui64> generator(42); + for (int j = 0; j < 50; ++j) { + for (size_t i = 0; i < size; ++i) { + s += static_cast<char>('a' + generator() % 26); + } + yexception e; + e << s; UNIT_ASSERT_EQUAL(e.AsStrBuf(), s.substr(0, tmp.Size() - 1)); - } - } + } + } void TestTIoSystemErrorSpecialMethods() { TString testStr{"systemError"}; |