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:
Diffstat (limited to 'indexer/indexer_tests/geometry_coding_test.cpp')
-rw-r--r--indexer/indexer_tests/geometry_coding_test.cpp37
1 files changed, 12 insertions, 25 deletions
diff --git a/indexer/indexer_tests/geometry_coding_test.cpp b/indexer/indexer_tests/geometry_coding_test.cpp
index 251e65c1e8..f454e67c37 100644
--- a/indexer/indexer_tests/geometry_coding_test.cpp
+++ b/indexer/indexer_tests/geometry_coding_test.cpp
@@ -1,24 +1,22 @@
#include "testing/testing.hpp"
-#include "indexer/geometry_coding.hpp"
-#include "geometry/mercator.hpp"
#include "indexer/coding_params.hpp"
-
+#include "indexer/geometry_coding.hpp"
#include "indexer/indexer_tests/test_polylines.hpp"
-#include "geometry/geometry_tests/large_polygon.hpp"
-#include "geometry/distance.hpp"
-#include "geometry/simplification.hpp"
-
#include "coding/byte_stream.hpp"
-#include "coding/point_to_integer.hpp"
+#include "coding/pointd_to_pointu.hpp"
#include "coding/varint.hpp"
#include "coding/writer.hpp"
-#include "base/logging.hpp"
+#include "geometry/distance.hpp"
+#include "geometry/geometry_tests/large_polygon.hpp"
+#include "geometry/mercator.hpp"
+#include "geometry/simplification.hpp"
+#include "base/logging.hpp"
-typedef m2::PointU PU;
+using PU = m2::PointU;
UNIT_TEST(EncodeDelta)
{
@@ -80,6 +78,9 @@ UNIT_TEST(PredictPointsInPolyline3_90deg)
namespace
{
+m2::PointU D2U(m2::PointD const & p) { return PointDToPointU(p, POINT_COORD_BITS); }
+
+m2::PointU GetMaxPoint() { return D2U(m2::PointD(MercatorBounds::maxX, MercatorBounds::maxY)); }
void TestPolylineEncode(string testName,
vector<m2::PointU> const & points,
@@ -142,8 +143,7 @@ void TestEncodePolyline(string name, m2::PointU maxPoint, vector<m2::PointU> con
TestPolylineEncode(name + "2", points, maxPoint, &EncodePolylinePrev2, &DecodePolylinePrev2);
TestPolylineEncode(name + "3", points, maxPoint, &EncodePolylinePrev3, &DecodePolylinePrev3);
}
-
-}
+} // namespace
UNIT_TEST(EncodePolyline)
{
@@ -173,19 +173,6 @@ UNIT_TEST(EncodePolyline)
// see 476c1d1d125f0c2deb8c commit for special decode test
-namespace
-{
- inline m2::PointU D2U(m2::PointD const & p)
- {
- return PointD2PointU(p, POINT_COORD_BITS);
- }
-
- inline m2::PointU GetMaxPoint()
- {
- return D2U(m2::PointD(MercatorBounds::maxX, MercatorBounds::maxY));
- }
-}
-
UNIT_TEST(DecodeEncodePolyline_DataSet1)
{
size_t const count = ARRAY_SIZE(index_test::arr1);