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
commit324348a37ed08cf66897faefb0ec4bebfe7804e1 (patch)
tree8736a3afd6953763bf57544746bf1b8b5404dec6 /library/cpp/testing
parent5eddcf9f19515e4be1e49ba1482d920e007a07d1 (diff)
downloadydb-324348a37ed08cf66897faefb0ec4bebfe7804e1.tar.gz
Restoring authorship annotation for <nkmakarov@yandex-team.ru>. Commit 1 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 44517a00924..5687d834293 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 e303e21e30a..41000890eb8 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)
{