From f1d12c53d70e8d18b0cb03ad300323902ed5c69f Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Thu, 29 May 2014 14:09:19 +0300 Subject: [PATCH 1/3] [test][strategies] fix compilation errors for pythagoras and haversine unit tests (introduced by the changes in pull request #47) --- test/strategies/haversine.cpp | 5 ++++- test/strategies/pythagoras.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/test/strategies/haversine.cpp b/test/strategies/haversine.cpp index e5c56a5d2..2d4f78550 100644 --- a/test/strategies/haversine.cpp +++ b/test/strategies/haversine.cpp @@ -90,7 +90,10 @@ void test_services() { // Compile-check if there is a strategy for this type - typedef typename services::default_strategy::type haversine_strategy_type; + typedef typename services::default_strategy + < + bg::point_tag, bg::point_tag, P1, P2 + >::type haversine_strategy_type; } P1 p1; diff --git a/test/strategies/pythagoras.cpp b/test/strategies/pythagoras.cpp index 914b80179..cedeb87cc 100644 --- a/test/strategies/pythagoras.cpp +++ b/test/strategies/pythagoras.cpp @@ -122,7 +122,10 @@ void test_services() { // Compile-check if there is a strategy for this type - typedef typename services::default_strategy::type pythagoras_strategy_type; + typedef typename services::default_strategy + < + bg::point_tag, bg::point_tag, P1, P2 + >::type pythagoras_strategy_type; } From 232f26679841e5c8223303a0dc4aaa196b4b09df Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Thu, 29 May 2014 14:43:57 +0300 Subject: [PATCH 2/3] [test][strategies] add compile time check for existence of default strategy for projected point and cross track --- test/strategies/cross_track.cpp | 9 +++++++++ test/strategies/projected_point.cpp | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/test/strategies/cross_track.cpp b/test/strategies/cross_track.cpp index 09166718a..3fcfd4c4c 100644 --- a/test/strategies/cross_track.cpp +++ b/test/strategies/cross_track.cpp @@ -57,6 +57,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) diff --git a/test/strategies/projected_point.cpp b/test/strategies/projected_point.cpp index fde126a20..fee6d06f7 100644 --- a/test/strategies/projected_point.cpp +++ b/test/strategies/projected_point.cpp @@ -50,6 +50,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 strategy_type; From f989738ebebffd5ac5346f6d05b6405adc8911ba Mon Sep 17 00:00:00 2001 From: Menelaos Karavelas Date: Thu, 29 May 2014 14:47:07 +0300 Subject: [PATCH 3/3] [test][strategies] update copyright headers --- test/strategies/cross_track.cpp | 11 ++++++++--- test/strategies/projected_point.cpp | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/test/strategies/cross_track.cpp b/test/strategies/cross_track.cpp index 3fcfd4c4c..fe665ea1b 100644 --- a/test/strategies/cross_track.cpp +++ b/test/strategies/cross_track.cpp @@ -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. diff --git a/test/strategies/projected_point.cpp b/test/strategies/projected_point.cpp index fee6d06f7..62c611495 100644 --- a/test/strategies/projected_point.cpp +++ b/test/strategies/projected_point.cpp @@ -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.