Rename concepts in unit tests

This commit is contained in:
Barend Gehrels 2016-07-27 16:18:00 +02:00
parent d3e572ede3
commit 798906441a
24 changed files with 49 additions and 49 deletions

View File

@ -76,7 +76,7 @@ void test_distance_point()
{
// Test custom strategy
BOOST_CONCEPT_ASSERT( (bg::concept::PointDistanceStrategy<taxicab_distance, P, P>) );
BOOST_CONCEPT_ASSERT( (bg::concepts::PointDistanceStrategy<taxicab_distance, P, P>) );
typedef typename services::return_type<taxicab_distance, P, P>::type cab_return_type;
BOOST_MPL_ASSERT((boost::is_same<cab_return_type, typename bg::coordinate_type<P>::type>));

View File

@ -128,7 +128,7 @@ void test_geometry(std::string const& wkt,
check_geometry(v, expected, distance);
BOOST_CONCEPT_ASSERT( (bg::concept::SimplifyStrategy<dp, point_type>) );
BOOST_CONCEPT_ASSERT( (bg::concepts::SimplifyStrategy<dp, point_type>) );
check_geometry(geometry, expected, distance, dp());
check_geometry(v, expected, distance, dp());
@ -155,7 +155,7 @@ void test_geometry(std::string const& wkt,
less_comparator
> douglass_peucker_with_less;
BOOST_CONCEPT_ASSERT( (bg::concept::SimplifyStrategy<douglass_peucker_with_less, point_type>) );
BOOST_CONCEPT_ASSERT( (bg::concepts::SimplifyStrategy<douglass_peucker_with_less, point_type>) );
check_geometry(geometry, expected, distance, douglass_peucker_with_less(less));
check_geometry(v, expected, distance, douglass_peucker_with_less(less));
@ -172,7 +172,7 @@ void test_geometry(std::string const& wkt,
bg::read_wkt(wkt, geometry);
boost::variant<Geometry> v(geometry);
BOOST_CONCEPT_ASSERT( (bg::concept::SimplifyStrategy<Strategy,
BOOST_CONCEPT_ASSERT( (bg::concepts::SimplifyStrategy<Strategy,
typename bg::point_type<Geometry>::type>) );
check_geometry(geometry, expected, distance, strategy);

View File

@ -20,8 +20,8 @@ namespace test
template <typename P, typename CP>
void function_asserting_a_point(P& p1, const CP& p2)
{
BOOST_CONCEPT_ASSERT((bg::concept::Point<P>));
BOOST_CONCEPT_ASSERT((bg::concept::ConstPoint<P>));
BOOST_CONCEPT_ASSERT((bg::concepts::Point<P>));
BOOST_CONCEPT_ASSERT((bg::concepts::ConstPoint<P>));
bg::get<0>(p1) = bg::get<0>(p2);
}

View File

@ -19,8 +19,8 @@ namespace test
template <typename P, typename C>
inline void function_requiring_a_point(P& p1, const C& p2)
{
BOOST_CONCEPT_ASSERT((bg::concept::Point<P>));
BOOST_CONCEPT_ASSERT((bg::concept::ConstPoint<C>));
BOOST_CONCEPT_ASSERT((bg::concepts::Point<P>));
BOOST_CONCEPT_ASSERT((bg::concepts::ConstPoint<C>));
bg::set<0>(p1, bg::get<0>(p2));
}

View File

@ -31,8 +31,8 @@
template <typename Geometry>
void test_linestring()
{
BOOST_CONCEPT_ASSERT( (bg::concept::Linestring<Geometry>) );
BOOST_CONCEPT_ASSERT( (bg::concept::ConstLinestring<Geometry>) );
BOOST_CONCEPT_ASSERT( (bg::concepts::Linestring<Geometry>) );
BOOST_CONCEPT_ASSERT( (bg::concepts::ConstLinestring<Geometry>) );
Geometry geometry;
typedef typename bg::point_type<Geometry>::type P;

View File

@ -71,6 +71,6 @@ template <> struct access<rw_point, 1>
int main()
{
boost::geometry::concept::check<const ro_point>();
boost::geometry::concept::check<rw_point>();
boost::geometry::concepts::check<const ro_point>();
boost::geometry::concepts::check<rw_point>();
}

View File

@ -20,7 +20,7 @@ struct dummy {};
int main()
{
bg::concept::check
bg::concepts::check
<
ro_lon_lat_point<double, bg::cs::geographic<dummy> > const
>();

View File

@ -20,7 +20,7 @@ namespace bg = boost::geometry;
int main()
{
bg::concept::check
bg::concepts::check
<
bg::model::point<double, 2, bg::cs::geographic<int> >
>();

View File

@ -19,7 +19,7 @@ namespace bg = boost::geometry;
int main()
{
bg::concept::check
bg::concepts::check
<
rw_lon_lat_point<double, bg::cs::spherical_equatorial<double> >
>();

View File

@ -30,19 +30,19 @@ inline void test_coordinate_system()
typedef rw_lon_lat_point<int, CoordinateSystem> rw_int_point;
typedef ro_lon_lat_point<int, CoordinateSystem> ro_int_point;
bg::concept::check<bg_int_point>();
bg::concept::check<bg_int_point const>();
bg::concepts::check<bg_int_point>();
bg::concepts::check<bg_int_point const>();
bg::concept::check<bg_double_point>();
bg::concept::check<bg_double_point const>();
bg::concepts::check<bg_double_point>();
bg::concepts::check<bg_double_point const>();
bg::concept::check<rw_int_point>();
bg::concept::check<rw_int_point const>();
bg::concept::check<ro_int_point const>();
bg::concepts::check<rw_int_point>();
bg::concepts::check<rw_int_point const>();
bg::concepts::check<ro_int_point const>();
bg::concept::check<rw_double_point>();
bg::concept::check<rw_double_point const>();
bg::concept::check<ro_double_point const>();
bg::concepts::check<rw_double_point>();
bg::concepts::check<rw_double_point const>();
bg::concepts::check<ro_double_point const>();
}

View File

@ -61,11 +61,11 @@ template <typename G>
void test_geometry(G const& geometry, std::size_t expected_size = 0)
{
#if defined(BOOST_GEOMETRY_TEST_RING)
BOOST_CONCEPT_ASSERT( (bg::concept::ConstRing<G>) );
BOOST_CONCEPT_ASSERT( (bg::concepts::ConstRing<G>) );
#elif defined(BOOST_GEOMETRY_TEST_MULTI_POINT)
BOOST_CONCEPT_ASSERT( (bg::concept::ConstMultiPoint<G>) );
BOOST_CONCEPT_ASSERT( (bg::concepts::ConstMultiPoint<G>) );
#else
BOOST_CONCEPT_ASSERT( (bg::concept::ConstLinestring<G>) );
BOOST_CONCEPT_ASSERT( (bg::concepts::ConstLinestring<G>) );
#endif
typedef typename bg::point_type<G>::type P;

View File

@ -73,7 +73,7 @@ template <typename T>
void test_coordinate_type()
{
// 1a: Check if Boost.Polygon's point fulfills Boost.Geometry's point concept
bg::concept::check<boost::polygon::point_data<T> >();
bg::concepts::check<boost::polygon::point_data<T> >();
// 1b: use a Boost.Polygon point in Boost.Geometry, calc. distance with two point types
boost::polygon::point_data<T> boost_polygon_point(1, 2);
@ -84,7 +84,7 @@ void test_coordinate_type()
2 * std::sqrt(2.0));
// 2a: Check if Boost.Polygon's box fulfills Boost.Geometry's box concept
bg::concept::check<boost::polygon::rectangle_data<T> >();
bg::concepts::check<boost::polygon::rectangle_data<T> >();
// 2b: use a Boost.Polygon rectangle in Boost.Geometry, compare with boxes
boost::polygon::rectangle_data<T> boost_polygon_box;
@ -99,7 +99,7 @@ void test_coordinate_type()
BOOST_CHECK_EQUAL(boost_polygon_area, boost_polygon_area_by_boost_polygon);
// 3a: Check if Boost.Polygon's polygon fulfills Boost.Geometry's ring concept
bg::concept::check<boost::polygon::polygon_data<T> >();
bg::concepts::check<boost::polygon::polygon_data<T> >();
// 3b: use a Boost.Polygon polygon (ring)
boost::polygon::polygon_data<T> boost_polygon_ring;

View File

@ -71,6 +71,6 @@ template <> struct access<rw_point, 1>
int main()
{
bg::concept::check<const ro_point>();
bg::concept::check<rw_point>();
bg::concepts::check<const ro_point>();
bg::concepts::check<rw_point>();
}

View File

@ -80,8 +80,8 @@ namespace boost { namespace geometry { namespace traits {
template <typename G>
void test_linestring()
{
BOOST_CONCEPT_ASSERT( (bg::concept::Linestring<G>) );
BOOST_CONCEPT_ASSERT( (bg::concept::ConstLinestring<G>) );
BOOST_CONCEPT_ASSERT( (bg::concepts::Linestring<G>) );
BOOST_CONCEPT_ASSERT( (bg::concepts::ConstLinestring<G>) );
G geometry;
typedef typename bg::point_type<G>::type P;

View File

@ -49,8 +49,8 @@ void test_all()
BOOST_CHECK_EQUAL(&s.second, &p2);
// Compilation tests, all things should compile.
BOOST_CONCEPT_ASSERT( (bg::concept::ConstSegment<S>) );
BOOST_CONCEPT_ASSERT( (bg::concept::Segment<S>) );
BOOST_CONCEPT_ASSERT( (bg::concepts::ConstSegment<S>) );
BOOST_CONCEPT_ASSERT( (bg::concepts::Segment<S>) );
typedef typename bg::coordinate_type<S>::type T;
typedef typename bg::point_type<S>::type SP;
@ -59,7 +59,7 @@ void test_all()
//std::cout << sizeof(typename coordinate_type<S>::type) << std::endl;
typedef bg::model::referring_segment<P const> refseg_t;
//BOOST_CONCEPT_ASSERT( (concept::ConstSegment<refseg_t>) );
//BOOST_CONCEPT_ASSERT( (concepts::ConstSegment<refseg_t>) );
refseg_t seg(p1, p2);

View File

@ -79,7 +79,7 @@ void test_distance(double lon1, double lat1, double lon2, double lat2, double ex
BOOST_CONCEPT_ASSERT
(
(bg::concept::PointDistanceStrategy<andoyer_type, P1, P2>)
(bg::concepts::PointDistanceStrategy<andoyer_type, P1, P2>)
);
andoyer_type andoyer;

View File

@ -83,7 +83,7 @@ void test_distance(
BOOST_CONCEPT_ASSERT
(
(bg::concept::PointSegmentDistanceStrategy<strategy_type, Point, Point>)
(bg::concepts::PointSegmentDistanceStrategy<strategy_type, Point, Point>)
);

View File

@ -43,7 +43,7 @@ struct test_distance
BOOST_CONCEPT_ASSERT
(
(bg::concept::PointDistanceStrategy<haversine_type, Point, Point>)
(bg::concepts::PointDistanceStrategy<haversine_type, Point, Point>)
);

View File

@ -145,7 +145,7 @@ void test_services()
typedef bgsd::pythagoras<CalculationType> strategy_type;
BOOST_CONCEPT_ASSERT( (bg::concept::PointDistanceStrategy<strategy_type, P1, P2>) );
BOOST_CONCEPT_ASSERT( (bg::concepts::PointDistanceStrategy<strategy_type, P1, P2>) );
typedef typename bgsd::services::return_type<strategy_type, P1, P2>::type return_type;

View File

@ -206,7 +206,7 @@ inline void test_services()
typedef bgsd::pythagoras_point_box<CalculationType> strategy_type;
BOOST_CONCEPT_ASSERT
( (bg::concept::PointDistanceStrategy<strategy_type, Point, Box>) );
( (bg::concepts::PointDistanceStrategy<strategy_type, Point, Box>) );
typedef typename bgsd::services::return_type
<

View File

@ -81,7 +81,7 @@ void test_services()
typedef bgsd::projected_point<CalculationType> strategy_type;
BOOST_CONCEPT_ASSERT( (bg::concept::PointSegmentDistanceStrategy<strategy_type, P, PS>) );
BOOST_CONCEPT_ASSERT( (bg::concepts::PointSegmentDistanceStrategy<strategy_type, P, PS>) );
typedef typename services::return_type<strategy_type, P, PS>::type return_type;
@ -140,11 +140,11 @@ void test_2d(std::string const& wkt_p,
BOOST_CONCEPT_ASSERT
(
(bg::concept::PointSegmentDistanceStrategy<Strategy, P1, P2>)
(bg::concepts::PointSegmentDistanceStrategy<Strategy, P1, P2>)
);
BOOST_CONCEPT_ASSERT
(
(bg::concept::PointSegmentDistanceStrategy<ComparableStrategy, P1, P2>)
(bg::concepts::PointSegmentDistanceStrategy<ComparableStrategy, P1, P2>)
);
{

View File

@ -72,7 +72,7 @@ void test_point_in_polygon(std::string const& case_id,
bool expected,
bool use_within = true)
{
BOOST_CONCEPT_ASSERT( (bg::concept::WithinStrategyPolygonal<Strategy>) );
BOOST_CONCEPT_ASSERT( (bg::concepts::WithinStrategyPolygonal<Strategy>) );
bool detected = use_within ?
bg::within(point, polygon, strategy) :
bg::covered_by(point, polygon, strategy);

View File

@ -52,7 +52,7 @@ void test_distance(double lon1, double lat1, double lon2, double lat2, double ex
BOOST_CONCEPT_ASSERT
(
(bg::concept::PointDistanceStrategy<thomas_type, P1, P2>)
(bg::concepts::PointDistanceStrategy<thomas_type, P1, P2>)
);
thomas_type thomas;

View File

@ -169,7 +169,7 @@ void test_vincenty(double lon1, double lat1, double lon2, double lat2,
BOOST_CONCEPT_ASSERT(
(
bg::concept::PointDistanceStrategy<vincenty_type, P1, P2>)
bg::concepts::PointDistanceStrategy<vincenty_type, P1, P2>)
);
vincenty_type vincenty(spheroid);