diff options
author | robot-srch-releaser <robot-srch-releaser@yandex-team.ru> | 2022-02-15 22:49:52 +0300 |
---|---|---|
committer | robot-srch-releaser <robot-srch-releaser@yandex-team.ru> | 2022-02-15 22:49:52 +0300 |
commit | 0bd0e5d1ab192e2782657cb05a36637ccb42ed57 (patch) | |
tree | 15e8e16a221859e077bf9e61e16fa44ac6615cea /util/generic/yexception_ut.cpp | |
parent | 5f04b971c47670f77cd2fee382ab624db7bd0a6e (diff) | |
download | ydb-0bd0e5d1ab192e2782657cb05a36637ccb42ed57.tar.gz |
Rollback: r9145043
[diff-resolver:svkrasnov] Sandbox task: https://sandbox.yandex-team.ru/task/1216524490/view
Task author: omakovski@
Description: Revert 9145043
Note: mandatory check (NEED_CHECK) was skipped
ref:dbe6517dcb523875d1e5de010069988b428c98bb
Diffstat (limited to 'util/generic/yexception_ut.cpp')
-rw-r--r-- | util/generic/yexception_ut.cpp | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/util/generic/yexception_ut.cpp b/util/generic/yexception_ut.cpp index 771ae2a9ca2..cb3e29fed84 100644 --- a/util/generic/yexception_ut.cpp +++ b/util/generic/yexception_ut.cpp @@ -15,7 +15,6 @@ static inline void Throw2DontMove() { #include <util/random/mersenne.h> #include <util/stream/output.h> #include <util/string/subst.h> -#include <util/string/split.h> #include "yexception_ut.h" #include "bt_exception.h" @@ -49,8 +48,6 @@ class TExceptionTest: public TTestBase { UNIT_TEST(TestBackTrace) UNIT_TEST(TestEnsureWithBackTrace1) UNIT_TEST(TestEnsureWithBackTrace2) - UNIT_TEST(TestCurrentExceptionMessageWithLIBUNWIND) - UNIT_TEST(TestCurrentExceptionMessageWithInvalidBacktraceFormatter) UNIT_TEST(TestRethrowAppend) UNIT_TEST(TestMacroOverload) UNIT_TEST(TestMessageCrop) @@ -131,48 +128,6 @@ private: UNIT_ASSERT(false); } - inline void TestCurrentExceptionMessageWithLIBUNWIND() { -#ifdef _YNDX_LIBUNWIND_ENABLE_EXCEPTION_BACKTRACE - try { - throw std::logic_error("some exception"); // is instance of std::exception - UNIT_ASSERT(false); - } catch (...) { - TString exceptionMessage = CurrentExceptionMessage(); - UNIT_ASSERT(exceptionMessage.Contains("(std::logic_error) some exception")); - TVector<TString> backtraceStrs = StringSplitter(exceptionMessage).Split('\n'); - UNIT_ASSERT(backtraceStrs.size() > 1); - } -#endif - } - - inline void TestCurrentExceptionMessageWithInvalidBacktraceFormatter() { -#ifdef _YNDX_LIBUNWIND_ENABLE_EXCEPTION_BACKTRACE - auto invalidFormatter = [](IOutputStream*, void* const*, size_t) { - Throw2DontMove(); - }; - SetFormatBackTraceFn(invalidFormatter); - - try { - Throw1DontMove(); - UNIT_ASSERT(false); - } catch (...) { - TString expected = "Failed to print backtrace: (yexception) " - "util/generic/yexception_ut.cpp:8: 1 qw 12.1\n" - "(yexception) util/generic/yexception_ut.cpp:4: blabla"; - UNIT_ASSERT_EQUAL(CurrentExceptionMessage(), expected); - } - try { - throw std::logic_error("std exception"); - UNIT_ASSERT(false); - } catch (...) { - TString expected = "Failed to print backtrace: (yexception) " - "util/generic/yexception_ut.cpp:8: 1 qw 12.1\n" - "(std::logic_error) std exception"; - UNIT_ASSERT_EQUAL(CurrentExceptionMessage(), expected); - } -#endif - } - inline void TestVirtualInheritance() { TStringStream ss; |