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

Method TestNoFlush

library/cpp/logger/log_ut.cpp:136–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136void TLogTest::TestNoFlush() {
137 {
138 TFileLogBackend fb(LOGFILE);
139 TLog log(THolder(new TThreadedLogBackend(&fb)));
140
141 int v1 = 12;
142 unsigned v2 = 34;
143 double v3 = 3.0;
144 const char* v4 = "qwqwqw";
145
146 log.ReopenLogNoFlush();
147 log.AddLog("some useful data %d, %u, %lf, %s\n", v1, v2, v3, v4);
148 }
149
150 TBlob data = TBlob::FromFileSingleThreaded(LOGFILE);
151
152 UNIT_ASSERT_EQUAL(TString((const char*)data.Begin(), data.Size()), "some useful data 12, 34, 3.000000, qwqwqw\n");
153}
154
155void TLogTest::TestFormat() {
156 TStringStream data;

Callers

nothing calls this directly

Calls 5

THolderClass · 0.50
ReopenLogNoFlushMethod · 0.45
AddLogMethod · 0.45
BeginMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected