diff --git a/test/algorithms/is_valid.cpp b/test/algorithms/is_valid.cpp index 03b93bbe5..46c2c6772 100644 --- a/test/algorithms/is_valid.cpp +++ b/test/algorithms/is_valid.cpp @@ -606,6 +606,27 @@ void test_open_polygons() false); } +template +inline void test_doc_example_polygon() +{ +#ifdef BOOST_GEOMETRY_TEST_DEBUG + std::cout << std::endl << std::endl; + std::cout << "************************************" << std::endl; + std::cout << " is_valid: doc example polygon " << std::endl; + std::cout << "************************************" << std::endl; +#endif + + typedef bg::model::polygon CCW_CG; + + CCW_CG poly; + + typedef validity_tester_areal tester; + typedef test_valid test; + + test::apply(from_wkt("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); +} + BOOST_AUTO_TEST_CASE( test_is_valid_polygon ) { bool const allow_duplicates = true; @@ -613,6 +634,7 @@ BOOST_AUTO_TEST_CASE( test_is_valid_polygon ) test_open_polygons(); test_open_polygons(); + test_doc_example_polygon(); } template