diff options
author | Mikhail Borisov <borisov.mikhail@gmail.com> | 2022-02-10 16:45:40 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:40 +0300 |
commit | 5d50718e66d9c037dc587a0211110b7d25a66185 (patch) | |
tree | e98df59de24d2ef7c77baed9f41e4875a2fef972 /library/cpp/testing/unittest/ut/main.cpp | |
parent | a6a92afe03e02795227d2641b49819b687f088f8 (diff) | |
download | ydb-5d50718e66d9c037dc587a0211110b7d25a66185.tar.gz |
Restoring authorship annotation for Mikhail Borisov <borisov.mikhail@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/testing/unittest/ut/main.cpp')
-rw-r--r-- | library/cpp/testing/unittest/ut/main.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/library/cpp/testing/unittest/ut/main.cpp b/library/cpp/testing/unittest/ut/main.cpp index e80326adf1..e303e21e30 100644 --- a/library/cpp/testing/unittest/ut/main.cpp +++ b/library/cpp/testing/unittest/ut/main.cpp @@ -36,20 +36,20 @@ namespace { struct TOtherFixture : public NUnitTest::TBaseFixture { size_t TheAnswer = 42; }; - - struct TSetUpTearDownFixture : public NUnitTest::TBaseFixture { - int Magic = 3; - - void SetUp(NUnitTest::TTestContext&) override { - UNIT_ASSERT_VALUES_EQUAL(Magic, 3); - Magic = 17; - } - - void TearDown(NUnitTest::TTestContext&) override { - UNIT_ASSERT_VALUES_EQUAL(Magic, 42); - Magic = 100; - } - }; + + struct TSetUpTearDownFixture : public NUnitTest::TBaseFixture { + int Magic = 3; + + void SetUp(NUnitTest::TTestContext&) override { + UNIT_ASSERT_VALUES_EQUAL(Magic, 3); + Magic = 17; + } + + void TearDown(NUnitTest::TTestContext&) override { + UNIT_ASSERT_VALUES_EQUAL(Magic, 42); + Magic = 100; + } + }; } TEST_F(TFixture, Test1) { @@ -83,11 +83,11 @@ Y_UNIT_TEST_SUITE_F(TestSuiteFixture, TSimpleFixture) UNIT_ASSERT_EQUAL(TheAnswer, 42); } } - -Y_UNIT_TEST_SUITE(TestSetUpTearDownFixture) -{ - Y_UNIT_TEST_F(Test1, TSetUpTearDownFixture) { - UNIT_ASSERT_VALUES_EQUAL(Magic, 17); - Magic = 42; - } -} + +Y_UNIT_TEST_SUITE(TestSetUpTearDownFixture) +{ + Y_UNIT_TEST_F(Test1, TSetUpTearDownFixture) { + UNIT_ASSERT_VALUES_EQUAL(Magic, 17); + Magic = 42; + } +} |