diff --git a/test/cs_undefined/Jamfile.v2 b/test/cs_undefined/Jamfile.v2 index f0ea382da..b5e53d916 100644 --- a/test/cs_undefined/Jamfile.v2 +++ b/test/cs_undefined/Jamfile.v2 @@ -15,6 +15,7 @@ test-suite boost-geometry-cs_undefined [ compile is.cpp : : csundef_is ] [ compile measure.cpp : : csundef_measure ] [ compile other.cpp : : csundef_other ] - [ compile relops.cpp : : csundef_relops ] + [ compile relops1.cpp : : csundef_relops1 ] + [ compile relops2.cpp : : csundef_relops2 ] [ compile setops.cpp : : csundef_setops ] ; diff --git a/test/cs_undefined/relops1.cpp b/test/cs_undefined/relops1.cpp new file mode 100644 index 000000000..c22bb6b07 --- /dev/null +++ b/test/cs_undefined/relops1.cpp @@ -0,0 +1,50 @@ +// Boost.Geometry + +// Copyright (c) 2019, Oracle and/or its affiliates. + +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle + +// Licensed under the Boost Software License version 1.0. +// http://www.boost.org/users/license.html + +#include "test_relops.hpp" + +int test_main(int, char*[]) +{ + geom g; + + bg::disjoint(g.pt, g.b, bg::strategy::covered_by::cartesian_point_box()); + bg::disjoint(g.pt, g.b, bg::strategy::covered_by::spherical_point_box()); + bg::disjoint(g.b, g.b, bg::strategy::disjoint::cartesian_box_box()); + bg::disjoint(g.b, g.b, bg::strategy::disjoint::spherical_box_box()); + bg::within(g.pt, g.b, bg::strategy::within::cartesian_point_box()); + bg::within(g.pt, g.b, bg::strategy::within::spherical_point_box()); + bg::within(g.b, g.b, bg::strategy::within::cartesian_box_box()); + bg::within(g.b, g.b, bg::strategy::within::spherical_box_box()); + bg::covered_by(g.pt, g.b, bg::strategy::covered_by::cartesian_point_box()); + bg::covered_by(g.pt, g.b, bg::strategy::covered_by::spherical_point_box()); + bg::covered_by(g.b, g.b, bg::strategy::covered_by::cartesian_box_box()); + bg::covered_by(g.b, g.b, bg::strategy::covered_by::spherical_box_box()); + + // P/P + ::rel_pp(g.pt, g.pt); + ::rel_pp(g.pt, g.mpt); + ::rel_pp(g.mpt, g.mpt); + + // P/L + //::rel_ps(g.pt, g.s); // relate not implemented + ::rel_ps(g.pt, g.ls); + ::rel_ps(g.pt, g.mls); + //::rel_ps(g.mpt, g.s); // relate not implemented + ::rel_ps(g.mpt, g.ls); + ::rel_ps(g.mpt, g.mls); + // P/A + ::rel_ps(g.pt, g.r); + ::rel_ps(g.mpt, g.r); + ::rel_ps(g.pt, g.po); + ::rel_ps(g.mpt, g.po); + ::rel_ps(g.pt, g.mpo); + ::rel_ps(g.mpt, g.mpo); + + return 0; +} diff --git a/test/cs_undefined/relops2.cpp b/test/cs_undefined/relops2.cpp new file mode 100644 index 000000000..11f971b87 --- /dev/null +++ b/test/cs_undefined/relops2.cpp @@ -0,0 +1,48 @@ +// Boost.Geometry + +// Copyright (c) 2019, Oracle and/or its affiliates. + +// Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle + +// Licensed under the Boost Software License version 1.0. +// http://www.boost.org/users/license.html + +#include "test_relops.hpp" + +int test_main(int, char*[]) +{ + geom g; + + // L/L + //::rel_ss(g.s, g.s); // relate not implemented + //::rel_ss(g.s, g.ls); // relate not implemented + //::rel_ss(g.s, g.mls); // relate not implemented + //::rel_ss(g.ls, g.s); // relate not implemented + ::rel_ss(g.ls, g.ls); + ::rel_ss(g.ls, g.mls); + //::rel_ss(g.mls, g.s); // relate not implemented + ::rel_ss(g.mls, g.ls); + ::rel_ss(g.mls, g.mls); + // L/A + //::rel_ss(g.s, g.r); // relate not implemented + ::rel_ss(g.ls, g.r); + ::rel_ss(g.mls, g.r); + //::rel_ss(g.s, g.po); // relate not implemented + ::rel_ss(g.ls, g.po); + ::rel_ss(g.mls, g.po); + //::rel_ss(g.s, g.mpo); // relate not implemented + ::rel_ss(g.ls, g.mpo); + ::rel_ss(g.mls, g.mpo); + // A/A + ::rel_ss(g.r, g.r); + ::rel_ss(g.po, g.r); + ::rel_ss(g.mpo, g.r); + ::rel_ss(g.r, g.po); + ::rel_ss(g.po, g.po); + ::rel_ss(g.mpo, g.po); + ::rel_ss(g.r, g.mpo); + ::rel_ss(g.po, g.mpo); + ::rel_ss(g.mpo, g.mpo); + + return 0; +} diff --git a/test/cs_undefined/relops.cpp b/test/cs_undefined/test_relops.hpp similarity index 64% rename from test/cs_undefined/relops.cpp rename to test/cs_undefined/test_relops.hpp index a019fe876..7a366bcd6 100644 --- a/test/cs_undefined/relops.cpp +++ b/test/cs_undefined/test_relops.hpp @@ -7,6 +7,9 @@ // Licensed under the Boost Software License version 1.0. // http://www.boost.org/users/license.html +#ifndef BOOST_GEOMETRY_TEST_CS_UNDEFINED_TEST_RELOPS_HPP +#define BOOST_GEOMETRY_TEST_CS_UNDEFINED_TEST_RELOPS_HPP + #include "common.hpp" #include @@ -158,71 +161,4 @@ inline void rel_ss(G1 const& g1, G2 const& g2) ::rel(g1, g2, bg::strategy::intersection::geographic_segments<>()); } -int test_main(int, char*[]) -{ - geom g; - - bg::disjoint(g.pt, g.b, bg::strategy::covered_by::cartesian_point_box()); - bg::disjoint(g.pt, g.b, bg::strategy::covered_by::spherical_point_box()); - bg::disjoint(g.b, g.b, bg::strategy::disjoint::cartesian_box_box()); - bg::disjoint(g.b, g.b, bg::strategy::disjoint::spherical_box_box()); - bg::within(g.pt, g.b, bg::strategy::within::cartesian_point_box()); - bg::within(g.pt, g.b, bg::strategy::within::spherical_point_box()); - bg::within(g.b, g.b, bg::strategy::within::cartesian_box_box()); - bg::within(g.b, g.b, bg::strategy::within::spherical_box_box()); - bg::covered_by(g.pt, g.b, bg::strategy::covered_by::cartesian_point_box()); - bg::covered_by(g.pt, g.b, bg::strategy::covered_by::spherical_point_box()); - bg::covered_by(g.b, g.b, bg::strategy::covered_by::cartesian_box_box()); - bg::covered_by(g.b, g.b, bg::strategy::covered_by::spherical_box_box()); - - // P/P - ::rel_pp(g.pt, g.pt); - ::rel_pp(g.pt, g.mpt); - ::rel_pp(g.mpt, g.mpt); - // P/L - //::rel_ps(g.pt, g.s); // relate not implemented - ::rel_ps(g.pt, g.ls); - ::rel_ps(g.pt, g.mls); - //::rel_ps(g.mpt, g.s); // relate not implemented - ::rel_ps(g.mpt, g.ls); - ::rel_ps(g.mpt, g.mls); - // P/A - ::rel_ps(g.pt, g.r); - ::rel_ps(g.mpt, g.r); - ::rel_ps(g.pt, g.po); - ::rel_ps(g.mpt, g.po); - ::rel_ps(g.pt, g.mpo); - ::rel_ps(g.mpt, g.mpo); - // L/L - //::rel_ss(g.s, g.s); // relate not implemented - //::rel_ss(g.s, g.ls); // relate not implemented - //::rel_ss(g.s, g.mls); // relate not implemented - //::rel_ss(g.ls, g.s); // relate not implemented - ::rel_ss(g.ls, g.ls); - ::rel_ss(g.ls, g.mls); - //::rel_ss(g.mls, g.s); // relate not implemented - ::rel_ss(g.mls, g.ls); - ::rel_ss(g.mls, g.mls); - // L/A - //::rel_ss(g.s, g.r); // relate not implemented - ::rel_ss(g.ls, g.r); - ::rel_ss(g.mls, g.r); - //::rel_ss(g.s, g.po); // relate not implemented - ::rel_ss(g.ls, g.po); - ::rel_ss(g.mls, g.po); - //::rel_ss(g.s, g.mpo); // relate not implemented - ::rel_ss(g.ls, g.mpo); - ::rel_ss(g.mls, g.mpo); - // A/A - ::rel_ss(g.r, g.r); - ::rel_ss(g.po, g.r); - ::rel_ss(g.mpo, g.r); - ::rel_ss(g.r, g.po); - ::rel_ss(g.po, g.po); - ::rel_ss(g.mpo, g.po); - ::rel_ss(g.r, g.mpo); - ::rel_ss(g.po, g.mpo); - ::rel_ss(g.mpo, g.mpo); - - return 0; -} +#endif // BOOST_GEOMETRY_TEST_CS_UNDEFINED_TEST_RELOPS_HPP