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

Method TestLinkTo

util/system/file_ut.cpp:42–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40 void TestCache();
41
42 inline void TestLinkTo() {
43 TTempFile tmp1("tmp1");
44 TTempFile tmp2("tmp2");
45
46 {
47 TFile f1(tmp1.Name(), OpenAlways | WrOnly);
48 TFile f2(tmp2.Name(), OpenAlways | WrOnly);
49
50 f1.LinkTo(f2);
51
52 f1.Write("12345", 5);
53 f2.Write("67890", 5);
54 }
55
56 UNIT_ASSERT_EQUAL(TUnbufferedFileInput(tmp2.Name()).ReadAll(), "1234567890");
57 }
58
59 inline void TestAppend() {
60 TTempFile tmp("tmp");

Callers

nothing calls this directly

Calls 5

LinkToMethod · 0.80
ReadAllMethod · 0.80
NameMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected