aboutsummaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authormyrrc <myrrc@yandex-team.ru>2022-02-10 16:50:05 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:50:05 +0300
commit64407caacb4d68aeabc6afe1ddd28750bf7522f4 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library
parent7a6e12b038f16b8bc4b7e77c2a2e08aa86ef7dc9 (diff)
downloadydb-64407caacb4d68aeabc6afe1ddd28750bf7522f4.tar.gz
Restoring authorship annotation for <myrrc@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library')
-rw-r--r--library/cpp/actors/core/actor.h10
-rw-r--r--library/cpp/actors/core/actorsystem.h4
-rw-r--r--library/cpp/actors/testlib/test_runtime.h2
-rw-r--r--library/cpp/testing/unittest/registar.h34
-rw-r--r--library/cpp/testing/unittest/registar_ut.cpp26
5 files changed, 38 insertions, 38 deletions
diff --git a/library/cpp/actors/core/actor.h b/library/cpp/actors/core/actor.h
index b0f529bd62..ed29bd14b9 100644
--- a/library/cpp/actors/core/actor.h
+++ b/library/cpp/actors/core/actor.h
@@ -356,11 +356,11 @@ namespace NActors {
return Send(recipient, static_cast<IEventBase*>(ev.Release()), flags, cookie, std::move(traceId));
}
- template <class TEvent, class ... TEventArgs>
- bool Send(TActorId recipient, TEventArgs&& ... args) const {
- return Send(recipient, MakeHolder<TEvent>(std::forward<TEventArgs>(args)...));
- }
-
+ template <class TEvent, class ... TEventArgs>
+ bool Send(TActorId recipient, TEventArgs&& ... args) const {
+ return Send(recipient, MakeHolder<TEvent>(std::forward<TEventArgs>(args)...));
+ }
+
void Schedule(TInstant deadline, IEventBase* ev, ISchedulerCookie* cookie = nullptr) const noexcept final;
void Schedule(TMonotonic deadline, IEventBase* ev, ISchedulerCookie* cookie = nullptr) const noexcept final;
void Schedule(TDuration delta, IEventBase* ev, ISchedulerCookie* cookie = nullptr) const noexcept final;
diff --git a/library/cpp/actors/core/actorsystem.h b/library/cpp/actors/core/actorsystem.h
index 91d539f3c5..40499d7586 100644
--- a/library/cpp/actors/core/actorsystem.h
+++ b/library/cpp/actors/core/actorsystem.h
@@ -193,8 +193,8 @@ namespace NActors {
TInterconnectSetup Interconnect;
- using TLocalServices = TVector<std::pair<TActorId, TActorSetupCmd>>;
- TLocalServices LocalServices;
+ using TLocalServices = TVector<std::pair<TActorId, TActorSetupCmd>>;
+ TLocalServices LocalServices;
ui32 GetExecutorsCount() const {
return Executors ? ExecutorsCount : CpuManager.GetExecutorsCount();
diff --git a/library/cpp/actors/testlib/test_runtime.h b/library/cpp/actors/testlib/test_runtime.h
index 37d7b85626..26e3b45c98 100644
--- a/library/cpp/actors/testlib/test_runtime.h
+++ b/library/cpp/actors/testlib/test_runtime.h
@@ -94,7 +94,7 @@ namespace NActors {
TVector<TEventMailboxId> NonEmptyMailboxes;
TVector<TEventMailboxId> OnlyMailboxes;
std::function<bool()> CustomFinalCondition;
- bool Quiet = false;
+ bool Quiet = false;
};
struct TScheduledEventQueueItem {
diff --git a/library/cpp/testing/unittest/registar.h b/library/cpp/testing/unittest/registar.h
index 454e77a980..44517a0092 100644
--- a/library/cpp/testing/unittest/registar.h
+++ b/library/cpp/testing/unittest/registar.h
@@ -627,23 +627,23 @@ public: \
// Assert that a specific exception is thrown
#define UNIT_ASSERT_EXCEPTION(A, E) UNIT_ASSERT_EXCEPTION_C(A, E, "")
-#define UNIT_ASSERT_NO_EXCEPTION_RESULT_C(A, C) \
- [&] () mutable -> decltype(A) { \
- static_assert(!std::is_void_v<decltype(A)>); \
- try { return (A); } \
- catch (const ::NUnitTest::TAssertException&) { throw; } \
- catch (...) { \
- UNIT_FAIL_IMPL( \
- "exception-free assertion failed", \
- Sprintf("%s throws %s\nException message: %s", \
- #A, (::TStringBuilder() << C).data(), \
- CurrentExceptionMessage().data())); \
- return decltype(A){}; \
- } \
- }()
-
-#define UNIT_ASSERT_NO_EXCEPTION_RESULT(A) UNIT_ASSERT_NO_EXCEPTION_RESULT_C(A, "")
-
+#define UNIT_ASSERT_NO_EXCEPTION_RESULT_C(A, C) \
+ [&] () mutable -> decltype(A) { \
+ static_assert(!std::is_void_v<decltype(A)>); \
+ try { return (A); } \
+ catch (const ::NUnitTest::TAssertException&) { throw; } \
+ catch (...) { \
+ UNIT_FAIL_IMPL( \
+ "exception-free assertion failed", \
+ Sprintf("%s throws %s\nException message: %s", \
+ #A, (::TStringBuilder() << C).data(), \
+ CurrentExceptionMessage().data())); \
+ return decltype(A){}; \
+ } \
+ }()
+
+#define UNIT_ASSERT_NO_EXCEPTION_RESULT(A) UNIT_ASSERT_NO_EXCEPTION_RESULT_C(A, "")
+
#define UNIT_ASSERT_NO_EXCEPTION_C(A, C) \
do { \
try { \
diff --git a/library/cpp/testing/unittest/registar_ut.cpp b/library/cpp/testing/unittest/registar_ut.cpp
index bcab099997..1f36d53abb 100644
--- a/library/cpp/testing/unittest/registar_ut.cpp
+++ b/library/cpp/testing/unittest/registar_ut.cpp
@@ -275,22 +275,22 @@ Y_UNIT_TEST_SUITE(TUnitTestMacroTest) {
}
}
- std::string ThrowStr() {
- if (ThrowMe) {
- throw *this;
- }
-
- return {};
- }
-
+ std::string ThrowStr() {
+ if (ThrowMe) {
+ throw *this;
+ }
+
+ return {};
+ }
+
void AssertNoException() {
UNIT_ASSERT_NO_EXCEPTION(Throw());
}
- void AssertNoExceptionRet() {
- const TString res = UNIT_ASSERT_NO_EXCEPTION_RESULT(ThrowStr());
- }
-
+ void AssertNoExceptionRet() {
+ const TString res = UNIT_ASSERT_NO_EXCEPTION_RESULT(ThrowStr());
+ }
+
template <class TExpectedException>
void AssertException() {
UNIT_ASSERT_EXCEPTION(Throw(), TExpectedException);
@@ -345,7 +345,7 @@ Y_UNIT_TEST_SUITE(TUnitTestMacroTest) {
Y_UNIT_TEST(NoException) {
UNIT_ASSERT_TEST_FAILS(TTestException().AssertNoException());
- UNIT_ASSERT_TEST_FAILS(TTestException().AssertNoExceptionRet());
+ UNIT_ASSERT_TEST_FAILS(TTestException().AssertNoExceptionRet());
UNIT_ASSERT_NO_EXCEPTION(TTestException("", false).Throw());
}