diff options
author | Mikhail Borisov <borisov.mikhail@gmail.com> | 2022-02-10 16:45:39 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:39 +0300 |
commit | a6a92afe03e02795227d2641b49819b687f088f8 (patch) | |
tree | f6984a1d27d5a7ec88a6fdd6e20cd5b7693b6ece /library/cpp/testing/unittest/ut | |
parent | c6dc8b8bd530985bc4cce0137e9a5de32f1087cb (diff) | |
download | ydb-a6a92afe03e02795227d2641b49819b687f088f8.tar.gz |
Restoring authorship annotation for Mikhail Borisov <borisov.mikhail@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/testing/unittest/ut')
-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 e303e21e30..e80326adf1 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; + } +} |