| 42 | } |
| 43 | |
| 44 | void TLogElementTest::TestWith() { |
| 45 | TStringStream output; |
| 46 | TLog log(MakeHolder<TStreamWithContextLogBackend>(&output)); |
| 47 | |
| 48 | THolder<TLogElement> src = MakeHolder<TLogElement>(&log); |
| 49 | |
| 50 | TString message = "Hello, World!"; |
| 51 | (*src).With("Foo", "Bar").With("Foo", "Baz") << message; |
| 52 | |
| 53 | src.Destroy(); |
| 54 | UNIT_ASSERT(output.Str() == "Hello, World!; Foo=Bar; Foo=Baz; "); |
| 55 | } |