diff --git a/test/cs_undefined/Jamfile b/test/cs_undefined/Jamfile index b5e53d916..2461aedcf 100644 --- a/test/cs_undefined/Jamfile +++ b/test/cs_undefined/Jamfile @@ -1,6 +1,6 @@ # Boost.Geometry # -# Copyright (c) 2019, Oracle and/or its affiliates. +# Copyright (c) 2019-2021, Oracle and/or its affiliates. # # Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle # @@ -17,5 +17,6 @@ test-suite boost-geometry-cs_undefined [ compile other.cpp : : csundef_other ] [ compile relops1.cpp : : csundef_relops1 ] [ compile relops2.cpp : : csundef_relops2 ] - [ compile setops.cpp : : csundef_setops ] + [ compile setops1.cpp : : csundef_setops1 ] + [ compile setops2.cpp : : csundef_setops2 ] ; diff --git a/test/cs_undefined/setops1.cpp b/test/cs_undefined/setops1.cpp new file mode 100644 index 000000000..87c1db3f6 --- /dev/null +++ b/test/cs_undefined/setops1.cpp @@ -0,0 +1,87 @@ +// Boost.Geometry + +// Copyright (c) 2019-2021, 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_setops.hpp" + +int test_main(int, char*[]) +{ + geom g; + + // P/P->P + ::set_idsu_pp(g.pt, g.pt, g.mpt); + ::set_idsu_pp(g.pt, g.mpt, g.mpt); + ::set_idsu_pp(g.mpt, g.mpt, g.mpt); + + // P/L->P + ::set_id_ps(g.pt, g.s, g.mpt); + ::set_id_ps(g.pt, g.ls, g.mpt); + ::set_id_ps(g.pt, g.mls, g.mpt); + ::set_id_ps(g.mpt, g.s, g.mpt); + ::set_id_ps(g.mpt, g.ls, g.mpt); + ::set_id_ps(g.mpt, g.mls, g.mpt); + + // P/A->P + // no intersection nor difference + //::set_id_ps(g.pt, g.r, g.mpt); + //::set_id_ps(g.pt, g.po, g.mpt); + //::set_id_ps(g.pt, g.mpo, g.mpt); + //::set_id_ps(g.mpt, g.r, g.mpt); + //::set_id_ps(g.mpt, g.po, g.mpt); + //::set_id_ps(g.mpt, g.mpo, g.mpt); + + // L/L->P + ::set_ids_ss(g.s, g.s, g.mpt); + //::set_i_ss(g.s, g.ls, g.mpt); // no intersection nor difference + //::set_i_ss(g.s, g.mls, g.mpt); // no intersection nor difference + //::set_i_ss(g.ls, g.s, g.mpt); // no intersection nor difference + ::set_ids_ss(g.ls, g.ls, g.mpt); + ::set_i_ss(g.ls, g.mls, g.mpt); // no difference nor sym_difference + //::set_i_ss(g.mls, g.s, g.mpt); // no intersection nor difference + ::set_i_ss(g.mls, g.ls, g.mpt); // no difference nor sym_difference + ::set_ids_ss(g.mls, g.mls, g.mpt); + + // L/L->L + //::set_ids_ss(g.s, g.s, g.mls); // union not implemented, missing specialization + //::set_idsu_ss(g.s, g.ls, g.mls); // missing specialization + //::set_idsu_ss(g.s, g.mls, g.mls); // missing specialization + //::set_idsu_ss(g.ls, g.s, g.mls); // missing specialization + ::set_idsu_ss(g.ls, g.ls, g.mls); + ::set_idsu_ss(g.ls, g.mls, g.mls); + //::set_idsu_ss(g.mls, g.s, g.mls); // missing specialization + ::set_idsu_ss(g.mls, g.ls, g.mls); + ::set_idsu_ss(g.mls, g.mls, g.mls); + + // S/B->L ? + + // L/B->L ? + + // L/A->P + //::set_ids_ss(g.s, g.r, g.mpt); // no intersection + //::set_ids_ss(g.s, g.po, g.mpt); // no intersection + //::set_ids_ss(g.s, g.mpo, g.mpt); // no intersection + ::set_ids_ss(g.ls, g.r, g.mpt); + ::set_ids_ss(g.ls, g.po, g.mpt); + ::set_ids_ss(g.ls, g.mpo, g.mpt); + ::set_ids_ss(g.mls, g.r, g.mpt); + ::set_ids_ss(g.mls, g.po, g.mpt); + ::set_ids_ss(g.mls, g.mpo, g.mpt); + + // L/A->L + //::set_id_ss(g.s, g.r, g.mls); // no intersection + //::set_id_ss(g.s, g.po, g.mls); // no intersection + //::set_id_ss(g.s, g.mpo, g.mls); // no intersection + ::set_id_ss(g.ls, g.r, g.mls); + ::set_id_ss(g.ls, g.po, g.mls); + ::set_id_ss(g.ls, g.mpo, g.mls); + ::set_id_ss(g.mls, g.r, g.mls); + ::set_id_ss(g.mls, g.po, g.mls); + ::set_id_ss(g.mls, g.mpo, g.mls); + + return 0; +} diff --git a/test/cs_undefined/setops2.cpp b/test/cs_undefined/setops2.cpp new file mode 100644 index 000000000..88c23936d --- /dev/null +++ b/test/cs_undefined/setops2.cpp @@ -0,0 +1,50 @@ +// Boost.Geometry + +// Copyright (c) 2019-2021, 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_setops.hpp" + +int test_main(int, char*[]) +{ + geom g; + + // A/A->P + ::set_i_ss(g.r, g.r, g.mpt); + ::set_i_ss(g.r, g.po, g.mpt); + ::set_i_ss(g.r, g.mpo, g.mpt); + ::set_i_ss(g.po, g.r, g.mpt); + ::set_i_ss(g.po, g.po, g.mpt); + ::set_i_ss(g.po, g.mpo, g.mpt); + ::set_i_ss(g.mpo, g.r, g.mpt); + ::set_i_ss(g.mpo, g.po, g.mpt); + ::set_i_ss(g.mpo, g.mpo, g.mpt); + + // A/A->L + ::set_i_ss(g.r, g.r, g.mls); + ::set_i_ss(g.r, g.po, g.mls); + ::set_i_ss(g.r, g.mpo, g.mls); + ::set_i_ss(g.po, g.r, g.mls); + ::set_i_ss(g.po, g.po, g.mls); + ::set_i_ss(g.po, g.mpo, g.mls); + ::set_i_ss(g.mpo, g.r, g.mls); + ::set_i_ss(g.mpo, g.po, g.mls); + ::set_i_ss(g.mpo, g.mpo, g.mls); + + // A/A->A + ::set_idsu_ss(g.r, g.r, g.mpo); + ::set_idsu_ss(g.r, g.po, g.mpo); + ::set_idsu_ss(g.r, g.mpo, g.mpo); + ::set_idsu_ss(g.po, g.r, g.mpo); + ::set_idsu_ss(g.po, g.po, g.mpo); + ::set_idsu_ss(g.po, g.mpo, g.mpo); + ::set_idsu_ss(g.mpo, g.r, g.mpo); + ::set_idsu_ss(g.mpo, g.po, g.mpo); + ::set_idsu_ss(g.mpo, g.mpo, g.mpo); + + return 0; +} diff --git a/test/cs_undefined/setops.cpp b/test/cs_undefined/test_setops.hpp similarity index 64% rename from test/cs_undefined/setops.cpp rename to test/cs_undefined/test_setops.hpp index d684214a4..67494d435 100644 --- a/test/cs_undefined/setops.cpp +++ b/test/cs_undefined/test_setops.hpp @@ -1,12 +1,15 @@ // Boost.Geometry -// Copyright (c) 2019, Oracle and/or its affiliates. +// Copyright (c) 2019-2021, 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 +#ifndef BOOST_GEOMETRY_TEST_CS_UNDEFINED_TEST_SETOPS_HPP +#define BOOST_GEOMETRY_TEST_CS_UNDEFINED_TEST_SETOPS_HPP + #include "common.hpp" #include @@ -170,112 +173,4 @@ inline void set_d_ss(G1 const& g1, G2 const& g2, G3 & g3) ::set_d(g1, g2, g3, bg::strategy::intersection::geographic_segments<>()); } -int test_main(int, char*[]) -{ - geom g; - - // P/P->P - ::set_idsu_pp(g.pt, g.pt, g.mpt); - ::set_idsu_pp(g.pt, g.mpt, g.mpt); - ::set_idsu_pp(g.mpt, g.mpt, g.mpt); - - // P/L->P - ::set_id_ps(g.pt, g.s, g.mpt); - ::set_id_ps(g.pt, g.ls, g.mpt); - ::set_id_ps(g.pt, g.mls, g.mpt); - ::set_id_ps(g.mpt, g.s, g.mpt); - ::set_id_ps(g.mpt, g.ls, g.mpt); - ::set_id_ps(g.mpt, g.mls, g.mpt); - - // P/A->P - // no intersection nor difference - //::set_id_ps(g.pt, g.r, g.mpt); - //::set_id_ps(g.pt, g.po, g.mpt); - //::set_id_ps(g.pt, g.mpo, g.mpt); - //::set_id_ps(g.mpt, g.r, g.mpt); - //::set_id_ps(g.mpt, g.po, g.mpt); - //::set_id_ps(g.mpt, g.mpo, g.mpt); - - // L/L->P - ::set_ids_ss(g.s, g.s, g.mpt); - //::set_i_ss(g.s, g.ls, g.mpt); // no intersection nor difference - //::set_i_ss(g.s, g.mls, g.mpt); // no intersection nor difference - //::set_i_ss(g.ls, g.s, g.mpt); // no intersection nor difference - ::set_ids_ss(g.ls, g.ls, g.mpt); - ::set_i_ss(g.ls, g.mls, g.mpt); // no difference nor sym_difference - //::set_i_ss(g.mls, g.s, g.mpt); // no intersection nor difference - ::set_i_ss(g.mls, g.ls, g.mpt); // no difference nor sym_difference - ::set_ids_ss(g.mls, g.mls, g.mpt); - - // L/L->L - //::set_ids_ss(g.s, g.s, g.mls); // union not implemented, missing specialization - //::set_idsu_ss(g.s, g.ls, g.mls); // missing specialization - //::set_idsu_ss(g.s, g.mls, g.mls); // missing specialization - //::set_idsu_ss(g.ls, g.s, g.mls); // missing specialization - ::set_idsu_ss(g.ls, g.ls, g.mls); - ::set_idsu_ss(g.ls, g.mls, g.mls); - //::set_idsu_ss(g.mls, g.s, g.mls); // missing specialization - ::set_idsu_ss(g.mls, g.ls, g.mls); - ::set_idsu_ss(g.mls, g.mls, g.mls); - - // S/B->L ? - - // L/B->L ? - - // L/A->P - //::set_ids_ss(g.s, g.r, g.mpt); // no intersection - //::set_ids_ss(g.s, g.po, g.mpt); // no intersection - //::set_ids_ss(g.s, g.mpo, g.mpt); // no intersection - ::set_ids_ss(g.ls, g.r, g.mpt); - ::set_ids_ss(g.ls, g.po, g.mpt); - ::set_ids_ss(g.ls, g.mpo, g.mpt); - ::set_ids_ss(g.mls, g.r, g.mpt); - ::set_ids_ss(g.mls, g.po, g.mpt); - ::set_ids_ss(g.mls, g.mpo, g.mpt); - - // L/A->L - //::set_id_ss(g.s, g.r, g.mls); // no intersection - //::set_id_ss(g.s, g.po, g.mls); // no intersection - //::set_id_ss(g.s, g.mpo, g.mls); // no intersection - ::set_id_ss(g.ls, g.r, g.mls); - ::set_id_ss(g.ls, g.po, g.mls); - ::set_id_ss(g.ls, g.mpo, g.mls); - ::set_id_ss(g.mls, g.r, g.mls); - ::set_id_ss(g.mls, g.po, g.mls); - ::set_id_ss(g.mls, g.mpo, g.mls); - - // A/A->P - ::set_i_ss(g.r, g.r, g.mpt); - ::set_i_ss(g.r, g.po, g.mpt); - ::set_i_ss(g.r, g.mpo, g.mpt); - ::set_i_ss(g.po, g.r, g.mpt); - ::set_i_ss(g.po, g.po, g.mpt); - ::set_i_ss(g.po, g.mpo, g.mpt); - ::set_i_ss(g.mpo, g.r, g.mpt); - ::set_i_ss(g.mpo, g.po, g.mpt); - ::set_i_ss(g.mpo, g.mpo, g.mpt); - - // A/A->L - ::set_i_ss(g.r, g.r, g.mls); - ::set_i_ss(g.r, g.po, g.mls); - ::set_i_ss(g.r, g.mpo, g.mls); - ::set_i_ss(g.po, g.r, g.mls); - ::set_i_ss(g.po, g.po, g.mls); - ::set_i_ss(g.po, g.mpo, g.mls); - ::set_i_ss(g.mpo, g.r, g.mls); - ::set_i_ss(g.mpo, g.po, g.mls); - ::set_i_ss(g.mpo, g.mpo, g.mls); - - // A/A->A - ::set_idsu_ss(g.r, g.r, g.mpo); - ::set_idsu_ss(g.r, g.po, g.mpo); - ::set_idsu_ss(g.r, g.mpo, g.mpo); - ::set_idsu_ss(g.po, g.r, g.mpo); - ::set_idsu_ss(g.po, g.po, g.mpo); - ::set_idsu_ss(g.po, g.mpo, g.mpo); - ::set_idsu_ss(g.mpo, g.r, g.mpo); - ::set_idsu_ss(g.mpo, g.po, g.mpo); - ::set_idsu_ss(g.mpo, g.mpo, g.mpo); - - return 0; -} +#endif // BOOST_GEOMETRY_TEST_CS_UNDEFINED_TEST_SETOPS_HPP