Merge pull request #50 from mkaravel/feature/distance-default-strategy

[test][strategies] fix compilation errors for pythagoras and haversine unit tests
This commit is contained in:
Adam Wulkiewicz
2014-05-29 13:51:30 +02:00
4 changed files with 42 additions and 8 deletions

View File

@@ -1,9 +1,14 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Unit Test
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
// Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
// Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
// This file was modified by Oracle on 2014.
// Modifications copyright (c) 2014, Oracle and/or its affiliates.
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
@@ -57,6 +62,15 @@ void test_distance(
>::type return_type;
{
// compile-check if there is a strategy for this type
typedef typename bg::strategy::distance::services::default_strategy
<
bg::point_tag, bg::segment_tag, Point, Point
>::type cross_track_strategy_type;
}
BOOST_CONCEPT_ASSERT
(
(bg::concept::PointSegmentDistanceStrategy<strategy_type, Point, Point>)

View File

@@ -90,7 +90,10 @@ void test_services()
{
// Compile-check if there is a strategy for this type
typedef typename services::default_strategy<bg::point_tag, P1, P2>::type haversine_strategy_type;
typedef typename services::default_strategy
<
bg::point_tag, bg::point_tag, P1, P2
>::type haversine_strategy_type;
}
P1 p1;

View File

@@ -1,9 +1,14 @@
// Boost.Geometry (aka GGL, Generic Geometry Library)
// Unit Test
// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
// Copyright (c) 2007-2014 Barend Gehrels, Amsterdam, the Netherlands.
// Copyright (c) 2008-2014 Bruno Lalande, Paris, France.
// Copyright (c) 2009-2014 Mateusz Loskot, London, UK.
// This file was modified by Oracle on 2014.
// Modifications copyright (c) 2014, Oracle and/or its affiliates.
// Contributed and/or modified by Menelaos Karavelas, on behalf of Oracle
// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
@@ -50,6 +55,15 @@ void test_services()
namespace bgsd = bg::strategy::distance;
namespace services = bg::strategy::distance::services;
{
// compile-check if there is a strategy for this type
typedef typename services::default_strategy
<
bg::point_tag, bg::segment_tag, P, PS
>::type projected_point_strategy_type;
}
// 1: normal, calculate distance:
typedef bgsd::projected_point<CalculationType> strategy_type;

View File

@@ -122,7 +122,10 @@ void test_services()
{
// Compile-check if there is a strategy for this type
typedef typename services::default_strategy<bg::point_tag, P1, P2>::type pythagoras_strategy_type;
typedef typename services::default_strategy
<
bg::point_tag, bg::point_tag, P1, P2
>::type pythagoras_strategy_type;
}