// Boost.Geometry (aka GGL, Generic Geometry Library) test file // // Copyright Barend Gehrels 2007-2009, Geodan, Amsterdam, the Netherlands // Use, modification and distribution is subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Include the single-geometry version #define BOOST_GEOMETRY_TEST_MULTI #include "traverse.cpp" #include #include #include #include #include #include #include #include #include #include "multi_overlay_cases.hpp" #include "multi_svg_mapper.hpp" // Because multi-intersections are similar to single, // we don't have to test all cases. // We only check "double" and the simplex (two triangles) // and cases which are specific to multi (if any) template void test_all() { namespace bg = boost::geometry; namespace ov = boost::geometry::detail::overlay; typedef bg::multi_polygon < bg::polygon < bg::point > > multi_polygon; typedef boost::tuple Tuple; test_overlay, Tuple> ( "simplex", boost::make_tuple(2, 6.42), case_multi_simplex[0], case_multi_simplex[1] ); test_overlay, Tuple> ( "simplex", boost::make_tuple(1, 14.58), case_multi_simplex[0], case_multi_simplex[1] ); // Bug found with "recursive boxes" // TODO: Solve this bug /*** test_overlay, Tuple> ( "recursive_box1", boost::make_tuple(1, 14.58), "MULTIPOLYGON(((3 9,3 10,4 10,4 9,3 9)),((1 1,1 2,2 2,2 1,1 1)),((7 8,7 9,8 9,8 8,7 8)),((8 0,8 1,9 1,9 0,8 0)))", "MULTIPOLYGON(((0 1,0 2,1 2,1 1,0 1)),((7 5,7 6,8 6,8 5,7 5)),((1 1,1 1,2 1,2 1,2 0,2 0,1 0,1 0,1 0,1 1)))" ); ***/ } int test_main(int, char* []) { test_all(); return 0; }