diff options
author | yazevnul <yazevnul@yandex-team.ru> | 2022-02-10 16:46:46 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:46 +0300 |
commit | 8cbc307de0221f84c80c42dcbe07d40727537e2c (patch) | |
tree | 625d5a673015d1df891e051033e9fcde5c7be4e5 /util/generic/yexception_ut.cpp | |
parent | 30d1ef3941e0dc835be7609de5ebee66958f215a (diff) | |
download | ydb-8cbc307de0221f84c80c42dcbe07d40727537e2c.tar.gz |
Restoring authorship annotation for <yazevnul@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 cb3e29fed84..81fb0f19da5 100644 --- a/util/generic/yexception_ut.cpp +++ b/util/generic/yexception_ut.cpp @@ -13,7 +13,7 @@ static inline void Throw2DontMove() { #include <util/generic/algorithm.h> #include <util/memory/tempbuf.h> #include <util/random/mersenne.h> -#include <util/stream/output.h> +#include <util/stream/output.h> #include <util/string/subst.h> #include "yexception_ut.h" @@ -27,7 +27,7 @@ static void CallbackFun(int i) { throw i; } -static IOutputStream* OUTS = nullptr; +static IOutputStream* OUTS = nullptr; namespace NOuter::NInner { void Compare10And20() { @@ -49,7 +49,7 @@ class TExceptionTest: public TTestBase { UNIT_TEST(TestEnsureWithBackTrace1) UNIT_TEST(TestEnsureWithBackTrace2) UNIT_TEST(TestRethrowAppend) - UNIT_TEST(TestMacroOverload) + UNIT_TEST(TestMacroOverload) UNIT_TEST(TestMessageCrop) UNIT_TEST(TestTIoSystemErrorSpecialMethods) UNIT_TEST(TestCurrentExceptionTypeNameMethod) @@ -260,26 +260,26 @@ private: UNIT_ASSERT_VALUES_EQUAL(i, N); } } - - void TestMacroOverload() { - try { - Y_ENSURE(10 > 20); - } catch (const yexception& e) { - UNIT_ASSERT(e.AsStrBuf().Contains("10 > 20")); - } - - try { - Y_ENSURE(10 > 20, "exception message to search for"); - } catch (const yexception& e) { - UNIT_ASSERT(e.AsStrBuf().Contains("exception message to search for")); - } + + void TestMacroOverload() { + try { + Y_ENSURE(10 > 20); + } catch (const yexception& e) { + UNIT_ASSERT(e.AsStrBuf().Contains("10 > 20")); + } + + try { + Y_ENSURE(10 > 20, "exception message to search for"); + } catch (const yexception& e) { + UNIT_ASSERT(e.AsStrBuf().Contains("exception message to search for")); + } try { NOuter::NInner::Compare10And20(); } catch (const yexception& e) { UNIT_ASSERT(e.AsStrBuf().Contains("10 > 20")); } - } + } void TestMessageCrop() { TTempBuf tmp; @@ -293,7 +293,7 @@ private: } yexception e; e << s; - UNIT_ASSERT_EQUAL(e.AsStrBuf(), s.substr(0, tmp.Size() - 1)); + UNIT_ASSERT_EQUAL(e.AsStrBuf(), s.substr(0, tmp.Size() - 1)); } } |