| 24 | UNIT_TEST_SUITE_REGISTRATION(TLogElementTest); |
| 25 | |
| 26 | void TLogElementTest::TestMoveCtor() { |
| 27 | TStringStream output; |
| 28 | TLog log(MakeHolder<TStreamLogBackend>(&output)); |
| 29 | |
| 30 | THolder<TLogElement> src = MakeHolder<TLogElement>(&log); |
| 31 | |
| 32 | TString message = "Hello, World!"; |
| 33 | (*src) << message; |
| 34 | |
| 35 | THolder<TLogElement> dst = MakeHolder<TLogElement>(std::move(*src)); |
| 36 | |
| 37 | src.Destroy(); |
| 38 | UNIT_ASSERT(output.Str() == ""); |
| 39 | |
| 40 | dst.Destroy(); |
| 41 | UNIT_ASSERT(output.Str() == message); |
| 42 | } |
| 43 | |
| 44 | void TLogElementTest::TestWith() { |
| 45 | TStringStream output; |