aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/testing/unittest/registar.cpp
diff options
context:
space:
mode:
authornga <nga@yandex-team.ru>2022-02-10 16:48:09 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:48:09 +0300
commitc2a1af049e9deca890e9923abe64fe6c59060348 (patch)
treeb222e5ac2e2e98872661c51ccceee5da0d291e13 /library/cpp/testing/unittest/registar.cpp
parent1f553f46fb4f3c5eec631352cdd900a0709016af (diff)
downloadydb-c2a1af049e9deca890e9923abe64fe6c59060348.tar.gz
Restoring authorship annotation for <nga@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/testing/unittest/registar.cpp')
-rw-r--r--library/cpp/testing/unittest/registar.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/library/cpp/testing/unittest/registar.cpp b/library/cpp/testing/unittest/registar.cpp
index bfb87970d1..3679b768ed 100644
--- a/library/cpp/testing/unittest/registar.cpp
+++ b/library/cpp/testing/unittest/registar.cpp
@@ -5,10 +5,10 @@
#include <util/generic/bt_exception.h>
#include <util/random/fast.h>
-#include <util/string/printf.h>
+#include <util/string/printf.h>
#include <util/system/backtrace.h>
#include <util/system/guard.h>
-#include <util/system/tls.h>
+#include <util/system/tls.h>
#include <util/system/error.h>
#include <util/string/cast.h>
@@ -27,13 +27,13 @@ TString NUnitTest::RandomString(size_t len, ui32 seed) {
return ret;
}
-
+
Y_POD_STATIC_THREAD(bool)
UnittestThread;
Y_POD_STATIC_THREAD(NUnitTest::TTestBase*)
currentTest;
::NUnitTest::TRaiseErrorHandler RaiseErrorHandler;
-
+
void ::NUnitTest::NPrivate::RaiseError(const char* what, const TString& msg, bool fatalFailure) {
Y_VERIFY(UnittestThread, "%s in non-unittest thread with message:\n%s", what, msg.data());
Y_VERIFY(GetCurrentTest());
@@ -51,17 +51,17 @@ void ::NUnitTest::NPrivate::RaiseError(const char* what, const TString& msg, boo
return;
}
throw TAssertException();
-}
-
+}
+
void ::NUnitTest::SetRaiseErrorHandler(::NUnitTest::TRaiseErrorHandler handler) {
Y_VERIFY(UnittestThread);
RaiseErrorHandler = std::move(handler);
}
-void ::NUnitTest::NPrivate::SetUnittestThread(bool unittestThread) {
+void ::NUnitTest::NPrivate::SetUnittestThread(bool unittestThread) {
Y_VERIFY(UnittestThread != unittestThread, "state check");
- UnittestThread = unittestThread;
-}
+ UnittestThread = unittestThread;
+}
void ::NUnitTest::NPrivate::SetCurrentTest(TTestBase* test) {
Y_VERIFY(!test || !currentTest, "state check");