diff options
| author | trofimenkov <[email protected]> | 2022-02-10 16:49:31 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:49:31 +0300 |
| commit | 7c6139b61ced2798d1134b68b8facf6925a36b8e (patch) | |
| tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/logger/element_ut.cpp | |
| parent | 30cebc2cfa79af3b577760a113e203a79450e6b6 (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/logger/element_ut.cpp')
| -rw-r--r-- | library/cpp/logger/element_ut.cpp | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/library/cpp/logger/element_ut.cpp b/library/cpp/logger/element_ut.cpp index fa7fa835bf7..32edc52dfb0 100644 --- a/library/cpp/logger/element_ut.cpp +++ b/library/cpp/logger/element_ut.cpp @@ -1,39 +1,39 @@ -#include "log.h" -#include "element.h" -#include "stream.h" - +#include "log.h" +#include "element.h" +#include "stream.h" + #include <util/generic/string.h> -#include <util/stream/str.h> -#include <util/generic/ptr.h> +#include <util/stream/str.h> +#include <util/generic/ptr.h> #include <utility> - + #include <library/cpp/testing/unittest/registar.h> - -class TLogElementTest: public TTestBase { - UNIT_TEST_SUITE(TLogElementTest); - UNIT_TEST(TestMoveCtor); - UNIT_TEST_SUITE_END(); - -public: - void TestMoveCtor(); -}; - -UNIT_TEST_SUITE_REGISTRATION(TLogElementTest); - -void TLogElementTest::TestMoveCtor() { - TStringStream output; + +class TLogElementTest: public TTestBase { + UNIT_TEST_SUITE(TLogElementTest); + UNIT_TEST(TestMoveCtor); + UNIT_TEST_SUITE_END(); + +public: + void TestMoveCtor(); +}; + +UNIT_TEST_SUITE_REGISTRATION(TLogElementTest); + +void TLogElementTest::TestMoveCtor() { + TStringStream output; TLog log(MakeHolder<TStreamLogBackend>(&output)); - + THolder<TLogElement> src = MakeHolder<TLogElement>(&log); - + TString message = "Hello, World!"; - (*src) << message; - + (*src) << message; + THolder<TLogElement> dst = MakeHolder<TLogElement>(std::move(*src)); - - src.Destroy(); - UNIT_ASSERT(output.Str() == ""); - - dst.Destroy(); - UNIT_ASSERT(output.Str() == message); -} + + src.Destroy(); + UNIT_ASSERT(output.Str() == ""); + + dst.Destroy(); + UNIT_ASSERT(output.Str() == message); +} |
