]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/geometry/test/algorithms/overlay/get_turns_areal_areal.cpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / geometry / test / algorithms / overlay / get_turns_areal_areal.cpp
1 // Boost.Geometry
2 // Unit Test
3
4 // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
5 // Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
6 // Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
7
8 // This file was modified by Oracle on 2015.
9 // Modifications copyright (c) 2015 Oracle and/or its affiliates.
10
11 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
12
13 // Use, modification and distribution is subject to the Boost Software License,
14 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
15 // http://www.boost.org/LICENSE_1_0.txt)
16
17 #include "test_get_turns.hpp"
18 #include <boost/geometry/geometries/geometries.hpp>
19
20 //TEST
21 //#include <to_svg.hpp>
22
23 template <typename T>
24 void test_all()
25 {
26 typedef bg::model::point<T, 2, bg::cs::cartesian> pt;
27 //typedef bg::model::ring<pt> ring;
28 typedef bg::model::polygon<pt> poly;
29 //typedef bg::model::multi_polygon<polygon> mpoly;
30
31 // mailing list report 17.03.2015
32 // operations ok but wrong IPs for int
33 // (the coordinates are generates at endpoints only)
34 {
35 // cw(duplicated point)
36 test_geometry<poly, poly>("POLYGON((-8042 -1485,-8042 250,-8042 250,15943 254,15943 -1485,-8042 -1485))",
37 "POLYGON((-7901 -1485,-7901 529,-7901 529, 15802 544, 15802 -1485, -7901 -1485))",
38 expected("iiu")("iui")("mcc")("cui"));
39 //to_svg<poly, poly>("POLYGON((-8042 -1485,-8042 250,15943 254,15943 -1485,-8042 -1485))",
40 // "POLYGON((-7901 -1485,-7901 529,15802 544, 15802 -1485, -7901 -1485))",
41 // "poly_poly_1.svg");
42 test_geometry<poly, poly>("POLYGON((-7901 -1485,-7901 529,-7901 529, 15802 544, 15802 -1485, -7901 -1485))",
43 "POLYGON((-8042 -1485,-8042 250,-8042 250,15943 254,15943 -1485,-8042 -1485))",
44 expected("iui")("iiu")("mcc")("ciu"));
45 }
46 }
47
48 int test_main(int, char* [])
49 {
50 test_all<int>();
51 test_all<float>();
52 test_all<double>();
53
54 #if ! defined(_MSC_VER)
55 test_all<long double>();
56 #endif
57
58 #if defined(HAVE_TTMATH)
59 test_all<ttmath_big>();
60 #endif
61 return 0;
62 }