backtrace_ut.cpp 854 B

12345678910111213141516171819202122232425262728
  1. #include "backtrace.h"
  2. #include <util/generic/vector.h>
  3. #include <util/generic/string.h>
  4. #include <library/cpp/testing/unittest/registar.h>
  5. namespace {
  6. Y_NO_INLINE void TestTrace394() {
  7. TStringStream ss;
  8. NYql::NBacktrace::KikimrBackTraceFormatImpl(&ss);
  9. #if !defined(_hardening_enabled_) && !defined(_win_)
  10. UNIT_ASSERT_STRING_CONTAINS(ss.Str(), "TestTrace394");
  11. #endif
  12. }
  13. Y_NO_INLINE void TestTrace39114() {
  14. TStringStream ss;
  15. NYql::NBacktrace::KikimrBackTraceFormatImpl(&ss);
  16. #if !defined(_hardening_enabled_) && !defined(_win_)
  17. UNIT_ASSERT_STRING_CONTAINS(ss.Str(), "TestTrace39114");
  18. #endif
  19. }
  20. }
  21. Y_UNIT_TEST_SUITE(TEST_BACKTRACE_AND_SYMBOLIZE) {
  22. Y_UNIT_TEST(TEST_NO_KIKIMR) {
  23. NYql::NBacktrace::EnableKikimrSymbolize();
  24. TestTrace394();
  25. TestTrace39114();
  26. }
  27. }