MCPcopy Create free account
hub / github.com/catboost/catboost / TestMoveCtor

Method TestMoveCtor

library/cpp/logger/element_ut.cpp:26–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24UNIT_TEST_SUITE_REGISTRATION(TLogElementTest);
25
26void 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
44void TLogElementTest::TestWith() {
45 TStringStream output;

Callers

nothing calls this directly

Calls 3

moveFunction · 0.50
DestroyMethod · 0.45
StrMethod · 0.45

Tested by

no test coverage detected