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

Method TestLocale

util/system/file_ut.cpp:203–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201#endif
202
203void TFileTest::TestLocale() {
204#ifdef _unix_
205 const char* loc = setlocale(LC_CTYPE, nullptr);
206 setlocale(LC_CTYPE, "ru_RU.UTF-8");
207#endif
208 TFile f("Имя.txt", CreateNew);
209 UNIT_ASSERT(f.IsOpen());
210 UNIT_ASSERT_VALUES_EQUAL(f.GetName(), "Имя.txt");
211 UNIT_ASSERT_VALUES_EQUAL(f.GetLength(), 0);
212 f.Close();
213 UNIT_ASSERT(NFs::Remove("Имя.txt"));
214#ifdef _unix_
215 setlocale(LC_CTYPE, loc);
216#endif
217}
218
219void TFileTest::TestFlush() {
220 TTempFile tmp("tmp");

Callers

nothing calls this directly

Calls 4

IsOpenMethod · 0.45
GetNameMethod · 0.45
GetLengthMethod · 0.45
CloseMethod · 0.45

Tested by

no test coverage detected