Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / geometry / test / algorithms / is_valid.cpp
index 6b4b164..9c9ca4d 100644 (file)
@@ -19,6 +19,7 @@
 #include <boost/test/included/unit_test.hpp>
 
 #include "test_is_valid.hpp"
+#include "overlay/overlay_cases.hpp"
 
 #include <boost/geometry/core/coordinate_type.hpp>
 
@@ -784,6 +785,7 @@ inline void test_open_polygons()
          false);
 }
 
+
 template <typename Point>
 inline void test_doc_example_polygon()
 {
@@ -794,13 +796,16 @@ inline void test_doc_example_polygon()
     std::cout << "************************************" << std::endl;
 #endif
 
-    typedef bg::model::polygon<Point> CCW_CG;
+    typedef bg::model::polygon<Point> ClockwiseClosedPolygon;
     typedef validity_tester_areal<true> tester;
-    typedef test_valid<tester, CCW_CG> test;
+    typedef test_valid<tester, ClockwiseClosedPolygon> test;
 
     test::apply("pg-doc",
                 "POLYGON((0 0,0 10,10 10,10 0,0 0),(0 0,9 1,9 2,0 0),(0 0,2 9,1 9,0 0),(2 9,9 2,9 9,2 9))",
                 false);
+
+    // Containing a self touching point, which should be valid
+    test::apply("ggl_list_20190307_matthieu_2", ggl_list_20190307_matthieu_2[1], true);
 }
 
 BOOST_AUTO_TEST_CASE( test_is_valid_polygon )