Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLev Dragunov <l.dragunov@corp.mail.ru>2015-07-02 14:54:39 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:54:19 +0300
commit491d291cc518652b9f9cbe0878a139a855ba8af2 (patch)
tree4cb99a332b30e581beadda6c02ed30abe4eb6957 /geometry/geometry_tests
parent7eed4e572d09a5f5359603599dfc07d06632fbc6 (diff)
New LatLon class.
Diffstat (limited to 'geometry/geometry_tests')
-rw-r--r--geometry/geometry_tests/geometry_tests.pro29
-rw-r--r--geometry/geometry_tests/latlon_test.cpp14
2 files changed, 29 insertions, 14 deletions
diff --git a/geometry/geometry_tests/geometry_tests.pro b/geometry/geometry_tests/geometry_tests.pro
index a27e531258..200cda12f8 100644
--- a/geometry/geometry_tests/geometry_tests.pro
+++ b/geometry/geometry_tests/geometry_tests.pro
@@ -19,26 +19,27 @@ HEADERS += \
SOURCES += \
../../testing/testingmain.cpp \
- distance_test.cpp \
- distance_on_sphere_test.cpp \
angle_test.cpp \
- common_test.cpp \
- screen_test.cpp \
+ anyrect_test.cpp \
cellid_test.cpp \
+ common_test.cpp \
+ covering_test.cpp \
+ distance_on_sphere_test.cpp \
+ distance_test.cpp \
intersect_test.cpp \
- point_test.cpp \
+ latlon_test.cpp \
packer_test.cpp \
- segments_intersect_test.cpp \
- covering_test.cpp \
+ point_test.cpp \
pointu_to_uint64_test.cpp \
- simplification_test.cpp \
- transformations_test.cpp \
- tree_test.cpp \
polygon_test.cpp \
- region_test.cpp \
rect_test.cpp \
- robust_test.cpp \
- anyrect_test.cpp \
region2d_binary_op_test.cpp \
- vector_test.cpp \
+ region_test.cpp \
+ robust_test.cpp \
+ screen_test.cpp \
+ segments_intersect_test.cpp \
+ simplification_test.cpp \
spline_test.cpp \
+ transformations_test.cpp \
+ tree_test.cpp \
+ vector_test.cpp \
diff --git a/geometry/geometry_tests/latlon_test.cpp b/geometry/geometry_tests/latlon_test.cpp
new file mode 100644
index 0000000000..2bb306f0cc
--- /dev/null
+++ b/geometry/geometry_tests/latlon_test.cpp
@@ -0,0 +1,14 @@
+#include "testing/testing.hpp"
+#include "geometry/latlon.hpp"
+#include "geometry/point2d.hpp"
+#include "indexer/mercator.hpp"
+
+UNIT_TEST(LatLonPointConstructorTest)
+{
+ m2::PointD basePoint(39.123, 42.456);
+ ms::LatLon wgsPoint(basePoint);
+ m2::PointD resultPoint(MercatorBounds::LonToX(wgsPoint.lon),
+ MercatorBounds::LatToY(wgsPoint.lat));
+ TEST_ALMOST_EQUAL_ULPS(basePoint.x, resultPoint.x, ());
+ TEST_ALMOST_EQUAL_ULPS(basePoint.y, resultPoint.y, ());
+}