aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/utils/backtrace/backtrace_ut.cpp
blob: 822060ed3225f3ed9a2d54ac03d9899594d1fedd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "backtrace.h"
#include <util/generic/vector.h>
#include <util/generic/string.h>
#include <library/cpp/testing/unittest/registar.h>
namespace {
    Y_NO_INLINE void TestTrace394() {
        TStringStream ss;
        NYql::NBacktrace::KikimrBackTraceFormatImpl(&ss);
#if !defined(_hardening_enabled_) && !defined(_win_)
        UNIT_ASSERT_STRING_CONTAINS(ss.Str(), "(anonymous namespace)::TestTrace394");
#endif
    }
    Y_NO_INLINE void TestTrace39114() {
        TStringStream ss;
        NYql::NBacktrace::KikimrBackTraceFormatImpl(&ss);
#if !defined(_hardening_enabled_) && !defined(_win_)
        UNIT_ASSERT_STRING_CONTAINS(ss.Str(), "(anonymous namespace)::TestTrace39114");
#endif
    }
}

Y_UNIT_TEST_SUITE(TEST_BACKTRACE_AND_SYMBOLIZE) {
    Y_UNIT_TEST(TEST_NO_KIKIMR) {
        NYql::NBacktrace::EnableKikimrSymbolize();
        TestTrace394();
        TestTrace39114();
    }
}