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

Method TestIt

util/folder/iterator_ut.cpp:100–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98 }
99
100 inline void TestIt() {
101 TDirHier hier;
102
103 const TString dir = "tmpdir";
104 const TDirHier::TPath path = {dir, 1};
105
106 hier.Add(path);
107
108 for (size_t i = 0; i < 10; ++i) {
109 const TString dir1 = dir + LOCSLASH_C + ToString(i);
110 const TDirHier::TPath path1 = {dir1, 1};
111
112 hier.Add(path1);
113
114 for (size_t j = 0; j < 10; ++j) {
115 const TString subdir2 = ToString(j);
116 const TString dir2 = dir1 + LOCSLASH_C + subdir2;
117 const TDirHier::TPath path2 = {dir2, 1};
118
119 hier.Add(path2);
120
121 for (size_t k = 0; k < 3; ++k) {
122 const TString file = dir2 + LOCSLASH_C + "file" + ToString(k);
123 const TDirHier::TPath fpath = {file, 0};
124
125 hier.Add(fpath);
126 }
127 }
128 }
129
130 TDirIterator d(dir);
131
132 for (auto it = d.begin(); it != d.end(); ++it) {
133 UNIT_ASSERT(hier.Have(it->fts_path, it->fts_info != FTS_F));
134 }
135 }
136
137 inline void TestSkip() {
138 TDirHier hier;

Callers

nothing calls this directly

Calls 5

HaveMethod · 0.80
ToStringFunction · 0.50
AddMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected