/
githubmirror
/
nbs
Обзор
Документация
Войти
/
githubmirror
/
nbs
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
util/system/src_location_ut.cpp
18 строк
508 B
qkrorlqr
Initial NBS OpenSource export
28 апр 2023, 21:54
28 апр 2023, 21:54
783a858
Код
Авторство
О чём код?
#include "src_location.h" #include <util/string/builder.h> #include <library/cpp/testing/unittest/registar.h> static inline TString GenLoc() { return TStringBuilder() << __LOCATION__; } Y_UNIT_TEST_SUITE(TestLocation) { Y_UNIT_TEST(Test1) { UNIT_ASSERT_VALUES_EQUAL(GenLoc(), "util/system/src_location_ut.cpp:8"); static constexpr TSourceLocation location = __LOCATION__; static_assert(location.Line >= 0, "__LOCATION__ can be used at compile time expressions"); } }