mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-23 06:33:42 +00:00
committed by
Konstantin Pastbin
parent
c9cbb64f12
commit
76ffc99abd
13
libs/geometry/geometry_tests/latlon_test.cpp
Normal file
13
libs/geometry/geometry_tests/latlon_test.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#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, ());
|
||||
}
|
||||
Reference in New Issue
Block a user