diff --git a/index/test/rtree/CMakeLists.txt b/index/test/rtree/CMakeLists.txt index 7c2ee72b8a..fd5e56cdc8 100644 --- a/index/test/rtree/CMakeLists.txt +++ b/index/test/rtree/CMakeLists.txt @@ -14,8 +14,11 @@ foreach(item IN ITEMS rtree_move_pack rtree_non_cartesian rtree_values - rtree_with_strategies #compile-fail rtree_values_invalid ) boost_geometry_add_unit_test("index" ${item}) endforeach() + +add_subdirectory(exceptions) +add_subdirectory(generated) +add_subdirectory(strategies) diff --git a/index/test/rtree/Jamfile b/index/test/rtree/Jamfile index 0ea4a30d15..ee3a7a336b 100644 --- a/index/test/rtree/Jamfile +++ b/index/test/rtree/Jamfile @@ -9,6 +9,7 @@ build-project exceptions ; build-project interprocess ; build-project generated ; +build-project strategies ; test-suite boost-geometry-index-rtree : @@ -19,6 +20,5 @@ test-suite boost-geometry-index-rtree [ run rtree_move_pack.cpp ] [ run rtree_non_cartesian.cpp ] [ run rtree_values.cpp ] - [ compile rtree_with_strategies.cpp ] [ compile-fail rtree_values_invalid.cpp ] ; diff --git a/index/test/rtree/exceptions/CMakeLists.txt b/index/test/rtree/exceptions/CMakeLists.txt new file mode 100644 index 0000000000..2789f5bc89 --- /dev/null +++ b/index/test/rtree/exceptions/CMakeLists.txt @@ -0,0 +1,15 @@ +# Boost.Geometry +# Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland. +# Copyright (c) 2024, Oracle and/or its affiliates. +# Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle +# Use, modification and distribution is subject to the Boost Software License, +# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +foreach(item IN ITEMS + rtree_exceptions_lin + rtree_exceptions_qua + rtree_exceptions_rst + ) + boost_geometry_add_unit_test("index" ${item}) +endforeach() diff --git a/index/test/rtree/generated/CMakeLists.txt b/index/test/rtree/generated/CMakeLists.txt new file mode 100644 index 0000000000..6f5fb9ded8 --- /dev/null +++ b/index/test/rtree/generated/CMakeLists.txt @@ -0,0 +1,7 @@ +# Boost.Geometry +# Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland. +# Use, modification and distribution is subject to the Boost Software License, +# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +add_subdirectory(b2d) \ No newline at end of file diff --git a/index/test/rtree/generated/b2d/CMakeLists.txt b/index/test/rtree/generated/b2d/CMakeLists.txt new file mode 100644 index 0000000000..a00c2c5e2a --- /dev/null +++ b/index/test/rtree/generated/b2d/CMakeLists.txt @@ -0,0 +1,19 @@ +# Boost.Geometry +# Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland. +# Use, modification and distribution is subject to the Boost Software License, +# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +foreach(item IN ITEMS + rtree_lin_add_b2d + rtree_lin_mod_b2d + rtree_lin_que_b2d + rtree_qua_add_b2d + rtree_qua_mod_b2d + rtree_qua_que_b2d + rtree_rst_add_b2d + rtree_rst_mod_b2d + rtree_rst_que_b2d + ) + boost_geometry_add_unit_test("index" ${item}) +endforeach() diff --git a/index/test/rtree/strategies/CMakeLists.txt b/index/test/rtree/strategies/CMakeLists.txt new file mode 100644 index 0000000000..dcb236cec7 --- /dev/null +++ b/index/test/rtree/strategies/CMakeLists.txt @@ -0,0 +1,19 @@ +# Boost.Geometry +# Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland. +# Use, modification and distribution is subject to the Boost Software License, +# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +foreach(item IN ITEMS + rtree_with_strategies_b_l + rtree_with_strategies_b_q + rtree_with_strategies_b_r + rtree_with_strategies_p_l + rtree_with_strategies_p_q + rtree_with_strategies_p_r + rtree_with_strategies_s_l + rtree_with_strategies_s_q + rtree_with_strategies_s_r + ) + boost_geometry_add_unit_test("index" ${item}) +endforeach() diff --git a/index/test/rtree/strategies/Jamfile b/index/test/rtree/strategies/Jamfile new file mode 100644 index 0000000000..383a30c415 --- /dev/null +++ b/index/test/rtree/strategies/Jamfile @@ -0,0 +1,20 @@ +# Boost.Geometry Index +# +# Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland. +# +# Use, modification and distribution is subject to the Boost Software License, +# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +test-suite boost-geometry-index-rtree-strategies + : + [ compile rtree_with_strategies_b_l.cpp ] + [ compile rtree_with_strategies_b_q.cpp ] + [ compile rtree_with_strategies_b_r.cpp ] + [ compile rtree_with_strategies_p_l.cpp ] + [ compile rtree_with_strategies_p_q.cpp ] + [ compile rtree_with_strategies_p_r.cpp ] + [ compile rtree_with_strategies_s_l.cpp ] + [ compile rtree_with_strategies_s_q.cpp ] + [ compile rtree_with_strategies_s_r.cpp ] + ; diff --git a/index/test/rtree/rtree_with_strategies.cpp b/index/test/rtree/strategies/rtree_with_strategies.hpp similarity index 94% rename from index/test/rtree/rtree_with_strategies.cpp rename to index/test/rtree/strategies/rtree_with_strategies.hpp index 40abeb03e6..54f5131538 100644 --- a/index/test/rtree/rtree_with_strategies.cpp +++ b/index/test/rtree/strategies/rtree_with_strategies.hpp @@ -7,6 +7,9 @@ // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_GEOMETRY_INDEX_TEST_RTREE_STRATEGIES_HPP +#define BOOST_GEOMETRY_INDEX_TEST_RTREE_STRATEGIES_HPP + #include #define BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL_PREDICATES @@ -132,7 +135,7 @@ void test_strategies() } template -void test_params() +void test_rtree() { test_strategies>(); test_strategies>(); @@ -142,19 +145,4 @@ void test_params() test_strategies>(); } -template -void test_value() -{ - test_params>(); - test_params>(); - test_params>(); -} - -int test_main(int, char* []) -{ - test_value(); - test_value(); - test_value(); - - return 0; -} +#endif // BOOST_GEOMETRY_INDEX_TEST_RTREE_STRATEGIES_HPP diff --git a/index/test/rtree/strategies/rtree_with_strategies_b_l.cpp b/index/test/rtree/strategies/rtree_with_strategies_b_l.cpp new file mode 100644 index 0000000000..165213803d --- /dev/null +++ b/index/test/rtree/strategies/rtree_with_strategies_b_l.cpp @@ -0,0 +1,17 @@ +// Boost.Geometry Index +// Unit Test + +// Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland. + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include "rtree_with_strategies.hpp" + +int test_main(int, char* []) +{ + test_rtree>(); + + return 0; +} diff --git a/index/test/rtree/strategies/rtree_with_strategies_b_q.cpp b/index/test/rtree/strategies/rtree_with_strategies_b_q.cpp new file mode 100644 index 0000000000..f146520a04 --- /dev/null +++ b/index/test/rtree/strategies/rtree_with_strategies_b_q.cpp @@ -0,0 +1,17 @@ +// Boost.Geometry Index +// Unit Test + +// Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland. + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include "rtree_with_strategies.hpp" + +int test_main(int, char* []) +{ + test_rtree>(); + + return 0; +} diff --git a/index/test/rtree/strategies/rtree_with_strategies_b_r.cpp b/index/test/rtree/strategies/rtree_with_strategies_b_r.cpp new file mode 100644 index 0000000000..7e26846625 --- /dev/null +++ b/index/test/rtree/strategies/rtree_with_strategies_b_r.cpp @@ -0,0 +1,17 @@ +// Boost.Geometry Index +// Unit Test + +// Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland. + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include "rtree_with_strategies.hpp" + +int test_main(int, char* []) +{ + test_rtree>(); + + return 0; +} diff --git a/index/test/rtree/strategies/rtree_with_strategies_p_l.cpp b/index/test/rtree/strategies/rtree_with_strategies_p_l.cpp new file mode 100644 index 0000000000..6ae60e2bc0 --- /dev/null +++ b/index/test/rtree/strategies/rtree_with_strategies_p_l.cpp @@ -0,0 +1,17 @@ +// Boost.Geometry Index +// Unit Test + +// Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland. + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include "rtree_with_strategies.hpp" + +int test_main(int, char* []) +{ + test_rtree>(); + + return 0; +} diff --git a/index/test/rtree/strategies/rtree_with_strategies_p_q.cpp b/index/test/rtree/strategies/rtree_with_strategies_p_q.cpp new file mode 100644 index 0000000000..97b2804490 --- /dev/null +++ b/index/test/rtree/strategies/rtree_with_strategies_p_q.cpp @@ -0,0 +1,17 @@ +// Boost.Geometry Index +// Unit Test + +// Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland. + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include "rtree_with_strategies.hpp" + +int test_main(int, char* []) +{ + test_rtree>(); + + return 0; +} diff --git a/index/test/rtree/strategies/rtree_with_strategies_p_r.cpp b/index/test/rtree/strategies/rtree_with_strategies_p_r.cpp new file mode 100644 index 0000000000..3ca887eb37 --- /dev/null +++ b/index/test/rtree/strategies/rtree_with_strategies_p_r.cpp @@ -0,0 +1,17 @@ +// Boost.Geometry Index +// Unit Test + +// Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland. + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include "rtree_with_strategies.hpp" + +int test_main(int, char* []) +{ + test_rtree>(); + + return 0; +} diff --git a/index/test/rtree/strategies/rtree_with_strategies_s_l.cpp b/index/test/rtree/strategies/rtree_with_strategies_s_l.cpp new file mode 100644 index 0000000000..b4dced5dae --- /dev/null +++ b/index/test/rtree/strategies/rtree_with_strategies_s_l.cpp @@ -0,0 +1,17 @@ +// Boost.Geometry Index +// Unit Test + +// Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland. + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include "rtree_with_strategies.hpp" + +int test_main(int, char* []) +{ + test_rtree>(); + + return 0; +} diff --git a/index/test/rtree/strategies/rtree_with_strategies_s_q.cpp b/index/test/rtree/strategies/rtree_with_strategies_s_q.cpp new file mode 100644 index 0000000000..4f60ed1f43 --- /dev/null +++ b/index/test/rtree/strategies/rtree_with_strategies_s_q.cpp @@ -0,0 +1,17 @@ +// Boost.Geometry Index +// Unit Test + +// Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland. + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include "rtree_with_strategies.hpp" + +int test_main(int, char* []) +{ + test_rtree>(); + + return 0; +} diff --git a/index/test/rtree/strategies/rtree_with_strategies_s_r.cpp b/index/test/rtree/strategies/rtree_with_strategies_s_r.cpp new file mode 100644 index 0000000000..1b6de10bc8 --- /dev/null +++ b/index/test/rtree/strategies/rtree_with_strategies_s_r.cpp @@ -0,0 +1,17 @@ +// Boost.Geometry Index +// Unit Test + +// Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland. + +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#include "rtree_with_strategies.hpp" + +int test_main(int, char* []) +{ + test_rtree>(); + + return 0; +}