MCPcopy Create free account
hub / github.com/comaps/comaps / MakeFakeBordersFile

Function MakeFakeBordersFile

generator/generator_tests_support/test_generator.cpp:29–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27char const * TestRawGenerator::kWikidataFilename = "wiki_urls.csv";
28
29bool MakeFakeBordersFile(std::string const & intemediatePath, std::string const & filename)
30{
31 auto const borderPath = base::JoinPath(intemediatePath, BORDERS_DIR);
32 auto & platform = GetPlatform();
33 auto const code = platform.MkDir(borderPath);
34 if (code != Platform::EError::ERR_OK && code != Platform::EError::ERR_FILE_ALREADY_EXISTS)
35 return false;
36
37 std::vector<m2::PointD> points = {{-180.0, -90.0}, {180.0, -90.0}, {180.0, 90.0}, {-180.0, 90.0}, {-180.0, -90.0}};
38 borders::DumpBorderToPolyFile(borderPath, filename, {m2::RegionD{std::move(points)}});
39 return true;
40}
41
42TestRawGenerator::TestRawGenerator()
43{

Callers

nothing calls this directly

Calls 3

JoinPathFunction · 0.85
DumpBorderToPolyFileFunction · 0.85
MkDirMethod · 0.45

Tested by

no test coverage detected