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

Method TestThreaded

library/cpp/logger/log_ut.cpp:64–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64void TLogTest::TestThreaded() {
65 {
66 TFileLogBackend fb(LOGFILE);
67 TLog log(THolder(new TThreadedLogBackend(&fb)));
68
69 int v1 = 12;
70 unsigned v2 = 34;
71 double v3 = 3.0;
72 const char* v4 = "qwqwqw";
73
74 log.ReopenLog();
75 log.AddLog("some useful data %d, %u, %lf, %s\n", v1, v2, v3, v4);
76 }
77
78 TBlob data = TBlob::FromFileSingleThreaded(LOGFILE);
79
80 UNIT_ASSERT_EQUAL(TString((const char*)data.Begin(), data.Size()), "some useful data 12, 34, 3.000000, qwqwqw\n");
81}
82
83void TLogTest::TestThreadedWithOverflow() {
84 class TFakeLogBackend: public TLogBackend {

Callers

nothing calls this directly

Calls 5

THolderClass · 0.50
ReopenLogMethod · 0.45
AddLogMethod · 0.45
BeginMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected