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

Method TestWrite

library/cpp/logger/log_ut.cpp:169–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169void TLogTest::TestWrite() {
170 TStringStream data;
171 TString test;
172
173 {
174 TLog log(THolder(new TStreamLogBackend(&data)));
175
176 for (size_t i = 0; i < 1000; ++i) {
177 TVector<char> buf(i, (char)i);
178
179 test.append(buf.data(), buf.size());
180 log.Write(buf.data(), buf.size());
181 }
182 }
183
184 UNIT_ASSERT_EQUAL(data.Str(), test);
185}
186
187void TLogTest::TestMetaFlags() {
188 class TTestLogBackendStub: public TLogBackend {

Callers

nothing calls this directly

Calls 6

THolderClass · 0.50
appendMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45
WriteMethod · 0.45
StrMethod · 0.45

Tested by

no test coverage detected