• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Boost.Geometry
2 
3 // Copyright (c) 2019, Oracle and/or its affiliates.
4 
5 // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
6 
7 // Licensed under the Boost Software License version 1.0.
8 // http://www.boost.org/users/license.html
9 
10 #include "common.hpp"
11 
12 #include <boost/geometry/algorithms/is_simple.hpp>
13 #include <boost/geometry/algorithms/is_valid.hpp>
14 
15 template <typename G, typename S>
is(G const & g,S const & s)16 inline void is(G const& g, S const& s)
17 {
18     bg::is_simple(g, s);
19     bg::is_valid(g, s);
20 }
21 
22 template <typename G>
is_x(G const & g)23 inline void is_x(G const& g)
24 {
25     ::is(g, bg::strategy::intersection::cartesian_segments<>());
26     ::is(g, bg::strategy::intersection::spherical_segments<>());
27     ::is(g, bg::strategy::intersection::geographic_segments<>());
28 }
29 
test_main(int,char * [])30 int test_main(int, char*[])
31 {
32     geom g;
33 
34     ::is_x(g.pt);
35     ::is_x(g.mpt);
36     ::is_x(g.s);
37     ::is_x(g.ls);
38     ::is_x(g.mls);
39     ::is_x(g.r);
40     ::is_x(g.po);
41     ::is_x(g.mpo);
42 
43     return 0;
44 }
45