From 48bed898fecc39a40da89f343c604ae65f18411e Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Wed, 11 Feb 2015 19:31:24 +0200 Subject: [PATCH] [test][strategies][douglas peucker] make the unit test for this strategy platform portable and platform independent --- test/strategies/douglas_peucker.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/strategies/douglas_peucker.cpp b/test/strategies/douglas_peucker.cpp index 720c04d93..38e41a0f8 100644 --- a/test/strategies/douglas_peucker.cpp +++ b/test/strategies/douglas_peucker.cpp @@ -40,6 +40,7 @@ #include #include +#include #include #include @@ -221,12 +222,15 @@ inline void test_with_strategy() typedef bg::model::point point_type; typedef bg::model::linestring linestring_type; + typedef bg::model::segment segment_type; typedef test_one_case tester; linestring_type ls1, ls2; linestring_type res1, res2; + point_type const p1(-6,-13), p2(0,-15); + segment_type const s(point_type(12,-3), point_type(-12,5)); - if (boost::is_same::value) + if (bg::comparable_distance(p1, s) >= bg::comparable_distance(p2, s)) { tester::apply("LINESTRING(12 -3, 4 8,-6 -13,-9 4,0 -15,-12 5)", 10,