diff options
author | myrrc <myrrc@yandex-team.ru> | 2022-02-10 16:50:05 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:05 +0300 |
commit | 7a6e12b038f16b8bc4b7e77c2a2e08aa86ef7dc9 (patch) | |
tree | b495213545637c65e9ecc0b3fdfbfa649a3027fa /library/cpp/testing/unittest/registar_ut.cpp | |
parent | 694fb2daa19ebb6642b93a8e94bd548b621b76df (diff) | |
download | ydb-7a6e12b038f16b8bc4b7e77c2a2e08aa86ef7dc9.tar.gz |
Restoring authorship annotation for <myrrc@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/testing/unittest/registar_ut.cpp')
-rw-r--r-- | library/cpp/testing/unittest/registar_ut.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/library/cpp/testing/unittest/registar_ut.cpp b/library/cpp/testing/unittest/registar_ut.cpp index 1f36d53abb..bcab099997 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()); } |