[test] Divide cs::undefined relops test into two deparate files.

This commit is contained in:
Adam Wulkiewicz 2019-06-30 22:17:26 +02:00
parent ea72a91746
commit 0c77558db2
4 changed files with 104 additions and 69 deletions

View File

@ -15,6 +15,7 @@ test-suite boost-geometry-cs_undefined
[ compile is.cpp : : csundef_is ] [ compile is.cpp : : csundef_is ]
[ compile measure.cpp : : csundef_measure ] [ compile measure.cpp : : csundef_measure ]
[ compile other.cpp : : csundef_other ] [ 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 ] [ compile setops.cpp : : csundef_setops ]
; ;

View File

@ -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;
}

View File

@ -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;
}

View File

@ -7,6 +7,9 @@
// Licensed under the Boost Software License version 1.0. // Licensed under the Boost Software License version 1.0.
// http://www.boost.org/users/license.html // 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 "common.hpp"
#include <boost/geometry/algorithms/covered_by.hpp> #include <boost/geometry/algorithms/covered_by.hpp>
@ -158,71 +161,4 @@ inline void rel_ss(G1 const& g1, G2 const& g2)
::rel(g1, g2, bg::strategy::intersection::geographic_segments<>()); ::rel(g1, g2, bg::strategy::intersection::geographic_segments<>());
} }
int test_main(int, char*[]) #endif // BOOST_GEOMETRY_TEST_CS_UNDEFINED_TEST_RELOPS_HPP
{
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;
}