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

Method TestFile

library/cpp/logger/log_ut.cpp:40–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38#define LOGFILE "tmplogfile"
39
40void TLogTest::TestFile() {
41 {
42 TLog log;
43
44 {
45 TLog filelog(LOGFILE);
46
47 log = filelog;
48 }
49
50 int v1 = 12;
51 unsigned v2 = 34;
52 double v3 = 3.0;
53 const char* v4 = "qwqwqw";
54
55 log.ReopenLog();
56 log.AddLog("some useful data %d, %u, %lf, %s\n", v1, v2, v3, v4);
57 }
58
59 TBlob data = TBlob::FromFileSingleThreaded(LOGFILE);
60
61 UNIT_ASSERT_EQUAL(TString((const char*)data.Begin(), data.Size()), "some useful data 12, 34, 3.000000, qwqwqw\n");
62}
63
64void TLogTest::TestThreaded() {
65 {

Callers

nothing calls this directly

Calls 4

ReopenLogMethod · 0.45
AddLogMethod · 0.45
BeginMethod · 0.45
SizeMethod · 0.45

Tested by

no test coverage detected