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:
authorvng <viktor.govako@gmail.com>2014-07-01 17:51:38 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:19:13 +0300
commitd67e303dc56a536e062db53983d9aef5081309f9 (patch)
tree2cca4bb832deb7a7a8cb274a4b5d156837817d40 /geometry/geometry_tests
parentd5c1066127f69052a741fe62e2f6fdca59ea8906 (diff)
Fixed viewport for search results on the map.
Diffstat (limited to 'geometry/geometry_tests')
-rw-r--r--geometry/geometry_tests/anyrect_test.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/geometry/geometry_tests/anyrect_test.cpp b/geometry/geometry_tests/anyrect_test.cpp
index e3d9a8872e..9ae89d06b5 100644
--- a/geometry/geometry_tests/anyrect_test.cpp
+++ b/geometry/geometry_tests/anyrect_test.cpp
@@ -71,3 +71,16 @@ UNIT_TEST(AnyRect_TestIsIntersect)
TEST(r0.IsIntersect(r3), ());
}
+UNIT_TEST(AnyRect_SetSizesToIncludePoint)
+{
+ m2::AnyRectD rect(m2::PointD(100, 100), math::pi / 6, m2::RectD(0, 0, 50, 50));
+
+ TEST(!rect.IsPointInside(m2::PointD(0, 0)), ());
+ TEST(!rect.IsPointInside(m2::PointD(200, 200)), ());
+
+ rect.SetSizesToIncludePoint(m2::PointD(0, 0));
+ TEST(rect.IsPointInside(m2::PointD(0, 0)), ());
+
+ rect.SetSizesToIncludePoint(m2::PointD(200, 200));
+ TEST(rect.IsPointInside(m2::PointD(200, 200)), ());
+}