]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/geometry/test/algorithms/overlay/get_turns_areal_areal.cpp
update ceph source to reef 18.1.2
[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
21 template <typename T>
22 void test_all()
23 {
24 typedef bg::model::point<T, 2, bg::cs::cartesian> pt;
25 //typedef bg::model::ring<pt> ring;
26 typedef bg::model::polygon<pt> poly;
27 //typedef bg::model::multi_polygon<polygon> mpoly;
28
29 // mailing list report 17.03.2015
30 // operations ok but wrong IPs for int
31 // (the coordinates are generates at endpoints only)
32 {
33 // cw(duplicated point)
34 test_geometry<poly, poly>("POLYGON((-8042 -1485,-8042 250,-8042 250,15943 254,15943 -1485,-8042 -1485))",
35 "POLYGON((-7901 -1485,-7901 529,-7901 529, 15802 544, 15802 -1485, -7901 -1485))",
36 expected("iiu")("iui")("mcc")("cui"));
37 test_geometry<poly, poly>("POLYGON((-7901 -1485,-7901 529,-7901 529, 15802 544, 15802 -1485, -7901 -1485))",
38 "POLYGON((-8042 -1485,-8042 250,-8042 250,15943 254,15943 -1485,-8042 -1485))",
39 expected("iui")("iiu")("mcc")("ciu"));
40 }
41 }
42
43 int test_main(int, char* [])
44 {
45 test_all<int>();
46 test_all<float>();
47 test_all<double>();
48
49 #if ! defined(_MSC_VER)
50 test_all<long double>();
51 #endif
52
53 return 0;
54 }