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

Method TestAppend

util/system/file_ut.cpp:59–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57 }
58
59 inline void TestAppend() {
60 TTempFile tmp("tmp");
61
62 {
63 TFile f(tmp.Name(), OpenAlways | WrOnly);
64
65 f.Write("12345678", 8);
66 }
67
68 {
69 TFile f(tmp.Name(), OpenAlways | WrOnly | ForAppend);
70
71 f.Write("67", 2);
72 f.Write("89", 2);
73 }
74
75 UNIT_ASSERT_EQUAL(TUnbufferedFileInput(tmp.Name()).ReadAll(), "123456786789");
76 }
77
78 inline void TestReWrite() {
79 TTempFile tmp("tmp");

Callers

nothing calls this directly

Calls 4

ReadAllMethod · 0.80
NameMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected