Skip to content

Commit 0900b5d

Browse files
authored
Merge pull request #1377 from awulkiew/fix/rtree_strategies_test
test: divide rtree_with_strategies test into multiple files
2 parents eeeb75a + b051ccd commit 0900b5d

17 files changed

+243
-19
lines changed

index/test/rtree/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ foreach(item IN ITEMS
1414
rtree_move_pack
1515
rtree_non_cartesian
1616
rtree_values
17-
rtree_with_strategies
1817
#compile-fail rtree_values_invalid
1918
)
2019
boost_geometry_add_unit_test("index" ${item})
2120
endforeach()
21+
22+
add_subdirectory(exceptions)
23+
add_subdirectory(generated)
24+
add_subdirectory(strategies)

index/test/rtree/Jamfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
build-project exceptions ;
1010
build-project interprocess ;
1111
build-project generated ;
12+
build-project strategies ;
1213

1314
test-suite boost-geometry-index-rtree
1415
:
@@ -19,6 +20,5 @@ test-suite boost-geometry-index-rtree
1920
[ run rtree_move_pack.cpp ]
2021
[ run rtree_non_cartesian.cpp ]
2122
[ run rtree_values.cpp ]
22-
[ compile rtree_with_strategies.cpp ]
2323
[ compile-fail rtree_values_invalid.cpp ]
2424
;
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Boost.Geometry
2+
# Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland.
3+
# Copyright (c) 2024, Oracle and/or its affiliates.
4+
# Contributed and/or modified by Vissarion Fysikopoulos, on behalf of Oracle
5+
# Use, modification and distribution is subject to the Boost Software License,
6+
# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7+
# http://www.boost.org/LICENSE_1_0.txt)
8+
9+
foreach(item IN ITEMS
10+
rtree_exceptions_lin
11+
rtree_exceptions_qua
12+
rtree_exceptions_rst
13+
)
14+
boost_geometry_add_unit_test("index" ${item})
15+
endforeach()
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Boost.Geometry
2+
# Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland.
3+
# Use, modification and distribution is subject to the Boost Software License,
4+
# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5+
# http://www.boost.org/LICENSE_1_0.txt)
6+
7+
add_subdirectory(b2d)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Boost.Geometry
2+
# Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland.
3+
# Use, modification and distribution is subject to the Boost Software License,
4+
# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5+
# http://www.boost.org/LICENSE_1_0.txt)
6+
7+
foreach(item IN ITEMS
8+
rtree_lin_add_b2d
9+
rtree_lin_mod_b2d
10+
rtree_lin_que_b2d
11+
rtree_qua_add_b2d
12+
rtree_qua_mod_b2d
13+
rtree_qua_que_b2d
14+
rtree_rst_add_b2d
15+
rtree_rst_mod_b2d
16+
rtree_rst_que_b2d
17+
)
18+
boost_geometry_add_unit_test("index" ${item})
19+
endforeach()
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Boost.Geometry
2+
# Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland.
3+
# Use, modification and distribution is subject to the Boost Software License,
4+
# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
5+
# http://www.boost.org/LICENSE_1_0.txt)
6+
7+
foreach(item IN ITEMS
8+
rtree_with_strategies_b_l
9+
rtree_with_strategies_b_q
10+
rtree_with_strategies_b_r
11+
rtree_with_strategies_p_l
12+
rtree_with_strategies_p_q
13+
rtree_with_strategies_p_r
14+
rtree_with_strategies_s_l
15+
rtree_with_strategies_s_q
16+
rtree_with_strategies_s_r
17+
)
18+
boost_geometry_add_unit_test("index" ${item})
19+
endforeach()

index/test/rtree/strategies/Jamfile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Boost.Geometry Index
2+
#
3+
# Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland.
4+
#
5+
# Use, modification and distribution is subject to the Boost Software License,
6+
# Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
7+
# http://www.boost.org/LICENSE_1_0.txt)
8+
9+
test-suite boost-geometry-index-rtree-strategies
10+
:
11+
[ compile rtree_with_strategies_b_l.cpp ]
12+
[ compile rtree_with_strategies_b_q.cpp ]
13+
[ compile rtree_with_strategies_b_r.cpp ]
14+
[ compile rtree_with_strategies_p_l.cpp ]
15+
[ compile rtree_with_strategies_p_q.cpp ]
16+
[ compile rtree_with_strategies_p_r.cpp ]
17+
[ compile rtree_with_strategies_s_l.cpp ]
18+
[ compile rtree_with_strategies_s_q.cpp ]
19+
[ compile rtree_with_strategies_s_r.cpp ]
20+
;

index/test/rtree/rtree_with_strategies.cpp renamed to index/test/rtree/strategies/rtree_with_strategies.hpp

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
88
// http://www.boost.org/LICENSE_1_0.txt)
99

10+
#ifndef BOOST_GEOMETRY_INDEX_TEST_RTREE_STRATEGIES_HPP
11+
#define BOOST_GEOMETRY_INDEX_TEST_RTREE_STRATEGIES_HPP
12+
1013
#include <vector>
1114

1215
#define BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL_PREDICATES
@@ -132,7 +135,7 @@ void test_strategies()
132135
}
133136

134137
template <typename Value, typename Params>
135-
void test_params()
138+
void test_rtree()
136139
{
137140
test_strategies<Value, Params, bg::strategies::index::cartesian<>>();
138141
test_strategies<Value, Params, bg::strategies::cartesian<>>();
@@ -142,19 +145,4 @@ void test_params()
142145
test_strategies<Value, Params, bg::strategies::geographic<>>();
143146
}
144147

145-
template <typename Value>
146-
void test_value()
147-
{
148-
test_params<Value, bgi::linear<4>>();
149-
test_params<Value, bgi::quadratic<4>>();
150-
test_params<Value, bgi::rstar<4>>();
151-
}
152-
153-
int test_main(int, char* [])
154-
{
155-
test_value<point>();
156-
test_value<box>();
157-
test_value<segment>();
158-
159-
return 0;
160-
}
148+
#endif // BOOST_GEOMETRY_INDEX_TEST_RTREE_STRATEGIES_HPP
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Boost.Geometry Index
2+
// Unit Test
3+
4+
// Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland.
5+
6+
// Use, modification and distribution is subject to the Boost Software License,
7+
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
8+
// http://www.boost.org/LICENSE_1_0.txt)
9+
10+
#include "rtree_with_strategies.hpp"
11+
12+
int test_main(int, char* [])
13+
{
14+
test_rtree<box, bgi::linear<4>>();
15+
16+
return 0;
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Boost.Geometry Index
2+
// Unit Test
3+
4+
// Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland.
5+
6+
// Use, modification and distribution is subject to the Boost Software License,
7+
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
8+
// http://www.boost.org/LICENSE_1_0.txt)
9+
10+
#include "rtree_with_strategies.hpp"
11+
12+
int test_main(int, char* [])
13+
{
14+
test_rtree<box, bgi::quadratic<4>>();
15+
16+
return 0;
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Boost.Geometry Index
2+
// Unit Test
3+
4+
// Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland.
5+
6+
// Use, modification and distribution is subject to the Boost Software License,
7+
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
8+
// http://www.boost.org/LICENSE_1_0.txt)
9+
10+
#include "rtree_with_strategies.hpp"
11+
12+
int test_main(int, char* [])
13+
{
14+
test_rtree<box, bgi::rstar<4>>();
15+
16+
return 0;
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Boost.Geometry Index
2+
// Unit Test
3+
4+
// Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland.
5+
6+
// Use, modification and distribution is subject to the Boost Software License,
7+
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
8+
// http://www.boost.org/LICENSE_1_0.txt)
9+
10+
#include "rtree_with_strategies.hpp"
11+
12+
int test_main(int, char* [])
13+
{
14+
test_rtree<point, bgi::linear<4>>();
15+
16+
return 0;
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Boost.Geometry Index
2+
// Unit Test
3+
4+
// Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland.
5+
6+
// Use, modification and distribution is subject to the Boost Software License,
7+
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
8+
// http://www.boost.org/LICENSE_1_0.txt)
9+
10+
#include "rtree_with_strategies.hpp"
11+
12+
int test_main(int, char* [])
13+
{
14+
test_rtree<point, bgi::quadratic<4>>();
15+
16+
return 0;
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Boost.Geometry Index
2+
// Unit Test
3+
4+
// Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland.
5+
6+
// Use, modification and distribution is subject to the Boost Software License,
7+
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
8+
// http://www.boost.org/LICENSE_1_0.txt)
9+
10+
#include "rtree_with_strategies.hpp"
11+
12+
int test_main(int, char* [])
13+
{
14+
test_rtree<point, bgi::rstar<4>>();
15+
16+
return 0;
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Boost.Geometry Index
2+
// Unit Test
3+
4+
// Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland.
5+
6+
// Use, modification and distribution is subject to the Boost Software License,
7+
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
8+
// http://www.boost.org/LICENSE_1_0.txt)
9+
10+
#include "rtree_with_strategies.hpp"
11+
12+
int test_main(int, char* [])
13+
{
14+
test_rtree<segment, bgi::linear<4>>();
15+
16+
return 0;
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Boost.Geometry Index
2+
// Unit Test
3+
4+
// Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland.
5+
6+
// Use, modification and distribution is subject to the Boost Software License,
7+
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
8+
// http://www.boost.org/LICENSE_1_0.txt)
9+
10+
#include "rtree_with_strategies.hpp"
11+
12+
int test_main(int, char* [])
13+
{
14+
test_rtree<segment, bgi::quadratic<4>>();
15+
16+
return 0;
17+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Boost.Geometry Index
2+
// Unit Test
3+
4+
// Copyright (c) 2025 Adam Wulkiewicz, Lodz, Poland.
5+
6+
// Use, modification and distribution is subject to the Boost Software License,
7+
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
8+
// http://www.boost.org/LICENSE_1_0.txt)
9+
10+
#include "rtree_with_strategies.hpp"
11+
12+
int test_main(int, char* [])
13+
{
14+
test_rtree<segment, bgi::rstar<4>>();
15+
16+
return 0;
17+
}

0 commit comments

Comments
 (0)