aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/testing
diff options
context:
space:
mode:
authornkmakarov <nkmakarov@yandex-team.ru>2022-02-10 16:49:06 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:49:06 +0300
commitf1803fa4ac9e2ee6cbfde317571ec330013392ff (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/testing
parent324348a37ed08cf66897faefb0ec4bebfe7804e1 (diff)
downloadydb-f1803fa4ac9e2ee6cbfde317571ec330013392ff.tar.gz
Restoring authorship annotation for <nkmakarov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/testing')
-rw-r--r--library/cpp/testing/unittest/registar.h4
-rw-r--r--library/cpp/testing/unittest/ut/main.cpp10
2 files changed, 7 insertions, 7 deletions
diff --git a/library/cpp/testing/unittest/registar.h b/library/cpp/testing/unittest/registar.h
index 5687d834293..44517a00924 100644
--- a/library/cpp/testing/unittest/registar.h
+++ b/library/cpp/testing/unittest/registar.h
@@ -547,7 +547,7 @@ public: \
} \
UNIT_ASSERT_C(0, "Exception hasn't been thrown, but it should have happened " << C); \
} while (false)
-
+
#define UNIT_CHECK_GENERATED_EXCEPTION(A, E) UNIT_CHECK_GENERATED_EXCEPTION_C(A, E, "")
#define UNIT_CHECK_GENERATED_NO_EXCEPTION_C(A, E, C) \
@@ -560,7 +560,7 @@ public: \
UNIT_ASSERT_C(0, "Exception has been thrown, but it shouldn't have happened " << C); \
} \
} while (false)
-
+
#define UNIT_CHECK_GENERATED_NO_EXCEPTION(A, E) UNIT_CHECK_GENERATED_NO_EXCEPTION_C(A, E, "and exception message is:\n" << CurrentExceptionMessage())
// Same as UNIT_ASSERT_EXCEPTION_SATISFIES but prints additional string C when nothing was thrown
diff --git a/library/cpp/testing/unittest/ut/main.cpp b/library/cpp/testing/unittest/ut/main.cpp
index 41000890eb8..e303e21e30a 100644
--- a/library/cpp/testing/unittest/ut/main.cpp
+++ b/library/cpp/testing/unittest/ut/main.cpp
@@ -55,11 +55,11 @@ namespace {
TEST_F(TFixture, Test1) {
ASSERT_EQ(I, 5);
}
-
-TEST(ETest, Test1) {
- UNIT_CHECK_GENERATED_EXCEPTION(ythrow yexception(), yexception);
- UNIT_CHECK_GENERATED_NO_EXCEPTION(true, yexception);
-}
+
+TEST(ETest, Test1) {
+ UNIT_CHECK_GENERATED_EXCEPTION(ythrow yexception(), yexception);
+ UNIT_CHECK_GENERATED_NO_EXCEPTION(true, yexception);
+}
Y_UNIT_TEST_SUITE(TestSingleTestFixture)
{