diff --git a/doc/src/examples/examples_utils/create_svg_closest_points.hpp b/doc/src/examples/examples_utils/create_svg_closest_points.hpp index 49cae538c..fd71a5292 100644 --- a/doc/src/examples/examples_utils/create_svg_closest_points.hpp +++ b/doc/src/examples/examples_utils/create_svg_closest_points.hpp @@ -14,9 +14,7 @@ #define CREATE_SVG_CLOSEST_POINTS_HPP #include -#if defined(HAVE_SVG) -# include -#endif +#include template < diff --git a/test/algorithms/closest_points/pl_l.cpp b/test/algorithms/closest_points/pl_l.cpp index ce08b954b..c9f970724 100644 --- a/test/algorithms/closest_points/pl_l.cpp +++ b/test/algorithms/closest_points/pl_l.cpp @@ -55,6 +55,38 @@ void test_closest_points_point_segment(Strategies const& strategies) //=========================================================================== +template +void test_closest_points_point_segment_integral(Strategies const& strategies) +{ + +#ifdef BOOST_GEOMETRY_TEST_DEBUG_CLOSEST_POINTS + std::cout << std::endl; + std::cout << "point/segment closest_points tests" << std::endl; +#endif + + using InputSegment = bg::model::segment; + using OutputSegment = bg::model::segment; + using tester = test_geometry; + + tester::apply("POINT(1 1)", + "SEGMENT(0 1,1 0)", + "SEGMENT(1 1,0.5 0.5)", + "SEGMENT(1 1,0.499962 0.500095)", + "SEGMENT(1 1,0.503314 0.496737)", + strategies); + + using tester_integral_output = test_geometry; + + tester_integral_output::apply("POINT(1 1)", + "SEGMENT(0 1,1 0)", + "SEGMENT(1 1,0 0)", + "SEGMENT(1 1,0 0)", + "SEGMENT(1 1,0 0)", + strategies); +} + +//=========================================================================== + template void test_closest_points_point_segment_diff_spheroid(Strategies const& strategies) { @@ -288,6 +320,9 @@ BOOST_AUTO_TEST_CASE( test_all_pointlike_linear ) test_closest_points_point_segment_diff_spheroid (andoyer(stype(5000000,6000000))); + + using int_car_point = bg::model::point; + test_closest_points_point_segment_integral(cartesian()); } // tests from https://github.com/boostorg/geometry/pull/707#issuecomment-786650747