diff options
| author | Anton Samokhvalov <[email protected]> | 2022-02-10 16:45:15 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:45:15 +0300 | 
| commit | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch) | |
| tree | da2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /library/cpp/testing/unittest/ut/main.cpp | |
| parent | 778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff) | |
Restoring authorship annotation for Anton Samokhvalov <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/testing/unittest/ut/main.cpp')
| -rw-r--r-- | library/cpp/testing/unittest/ut/main.cpp | 50 | 
1 files changed, 25 insertions, 25 deletions
diff --git a/library/cpp/testing/unittest/ut/main.cpp b/library/cpp/testing/unittest/ut/main.cpp index e303e21e30a..cba1681c835 100644 --- a/library/cpp/testing/unittest/ut/main.cpp +++ b/library/cpp/testing/unittest/ut/main.cpp @@ -7,27 +7,27 @@  #include <util/system/env.h>  #include <util/system/fs.h> -TEST(GTest, Test1) { -    UNIT_ASSERT_EQUAL(1, 1); -} - -TEST(GTest, Test2) { -    UNIT_ASSERT_EQUAL(2, 2); -} - -namespace { -    struct TFixture : ::testing::Test { -        TFixture() -            : I(0) -        { -        } - +TEST(GTest, Test1) {  +    UNIT_ASSERT_EQUAL(1, 1);  +}  +  +TEST(GTest, Test2) {  +    UNIT_ASSERT_EQUAL(2, 2);  +}  +  +namespace {  +    struct TFixture : ::testing::Test {  +        TFixture()  +            : I(0)  +        {  +        }  +           void SetUp() override { -            I = 5; -        } - -        int I; -    }; +            I = 5;  +        }  +  +        int I;  +    };       struct TSimpleFixture : public NUnitTest::TBaseFixture {          size_t Value = 24; @@ -50,11 +50,11 @@ namespace {              Magic = 100;          }      }; -} - -TEST_F(TFixture, Test1) { -    ASSERT_EQ(I, 5); -} +}  +  +TEST_F(TFixture, Test1) {  +    ASSERT_EQ(I, 5);  +}   TEST(ETest, Test1) {      UNIT_CHECK_GENERATED_EXCEPTION(ythrow yexception(), yexception);  | 
