Files
comaps/libs/geometry/geometry_tests/latlon_test.cpp
Alexander Borsuk 76ffc99abd New cpp folder structure
Signed-off-by: Alexander Borsuk <me@alex.bio>
2025-08-14 20:52:04 +07:00

14 lines
440 B
C++

#include "testing/testing.hpp"
#include "geometry/latlon.hpp"
#include "geometry/point2d.hpp"
#include "geometry/mercator.hpp"
UNIT_TEST(LatLonPointConstructorTest)
{
m2::PointD basePoint(39.123, 42.456);
ms::LatLon wgsPoint = mercator::ToLatLon(basePoint);
m2::PointD resultPoint = mercator::FromLatLon(wgsPoint);
TEST_ALMOST_EQUAL_ULPS(basePoint.x, resultPoint.x, ());
TEST_ALMOST_EQUAL_ULPS(basePoint.y, resultPoint.y, ());
}