Imported Upstream version 1.57.0
[platform/upstream/boost.git] / libs / geometry / test / multi / algorithms / multi_intersects.cpp
1 // Boost.Geometry (aka GGL, Generic Geometry Library)
2 // Unit Test
3
4 // Copyright (c) 2012 Barend Gehrels, Amsterdam, the Netherlands.
5
6 // Use, modification and distribution is subject to the Boost Software License,
7 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt)
9
10 #include <iostream>
11 #include <string>
12
13
14 #include <geometry_test_common.hpp>
15
16 #include <algorithms/test_intersects.hpp>
17
18 #include <boost/geometry.hpp>
19
20 #include <boost/geometry/geometries/geometries.hpp>
21 #include <boost/geometry/geometries/point_xy.hpp>
22 #include <boost/geometry/multi/geometries/multi_polygon.hpp>
23
24 template <typename P>
25 void test_all()
26 {
27     typedef bg::model::polygon<P> polygon;
28     typedef bg::model::multi_polygon<polygon> mp;
29
30     test_geometry<mp, mp>("MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
31             "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
32         true);
33
34     test_geometry<P, mp>("POINT(0 0)",
35         "MULTIPOLYGON(((0 0,0 10,10 10,10 0,0 0)))",
36         true);
37
38 }
39
40 int test_main(int, char* [])
41 {
42     //test_all<bg::model::d2::point_xy<float> >();
43     test_all<bg::model::d2::point_xy<double> >();
44
45 #ifdef HAVE_TTMATH
46     test_all<bg::model::d2::point_xy<ttmath_big> >();
47 #endif
48
49     return 0;
50 }
51