Files
comaps/generator/generator_tests/srtm_parser_test.cpp
Konstantin Pastbin e3e4a1985a Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run:
  git remote add om-historic [om-historic.git repo url]
  git fetch --tags om-historic
  git replace squashed-history historic-commits
2025-05-08 21:10:51 +07:00

29 lines
621 B
C++

#include "testing/testing.hpp"
#include "generator/srtm_parser.hpp"
using namespace generator;
namespace
{
inline std::string GetBase(ms::LatLon const & coord) { return SrtmTile::GetBase(coord); }
UNIT_TEST(FilenameTests)
{
auto name = GetBase({56.4566, 37.3467});
TEST_EQUAL(name, "N56E037", ());
name = GetBase({34.077433, -118.304569});
TEST_EQUAL(name, "N34W119", ());
name = GetBase({0.1, 0.1});
TEST_EQUAL(name, "N00E000", ());
name = GetBase({-35.35, -12.1});
TEST_EQUAL(name, "S36W013", ());
name = GetBase({-34.622358, -58.383654});
TEST_EQUAL(name, "S35W059", ());
}
} // namespace