| 139 | // TODO(svkrasnov): the output should be canonized after https://st.yandex-team.ru/YMAKE-103 |
| 140 | #ifdef _YNDX_LIBUNWIND_ENABLE_EXCEPTION_BACKTRACE |
| 141 | void TestFormatCurrentException() { |
| 142 | try { |
| 143 | throw std::logic_error("some exception"); // is instance of std::exception |
| 144 | UNIT_ASSERT(false); |
| 145 | } catch (...) { |
| 146 | TString exceptionMessage = FormatCurrentException(); |
| 147 | UNIT_ASSERT(exceptionMessage.Contains("(std::logic_error) some exception")); |
| 148 | TVector<TString> backtraceStrs = StringSplitter(exceptionMessage).Split('\n'); |
| 149 | UNIT_ASSERT(backtraceStrs.size() > 1); |
| 150 | } |
| 151 | } |
| 152 | #endif |
| 153 | |
| 154 | void TestFormatCurrentExceptionWithNoException() { |
nothing calls this directly
no test coverage detected