From 3c18981c7391b8ca82c67a901a4071ad8afd79d7 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Fri, 13 Jan 2017 22:35:56 +0100 Subject: [PATCH 1/3] [test][extensions] Change namesepace concept to concepts. --- extensions/test/gis/latlong/cross_track.cpp | 2 +- extensions/test/nsphere/nsphere-circle.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/test/gis/latlong/cross_track.cpp b/extensions/test/gis/latlong/cross_track.cpp index 826894589..d8985e67d 100644 --- a/extensions/test/gis/latlong/cross_track.cpp +++ b/extensions/test/gis/latlong/cross_track.cpp @@ -54,7 +54,7 @@ void test_distance( #if !defined(BOOST_MSVC) BOOST_CONCEPT_ASSERT ( - (bg::concept::PointSegmentDistanceStrategy) + (bg::concepts::PointSegmentDistanceStrategy) ); #endif diff --git a/extensions/test/nsphere/nsphere-circle.cpp b/extensions/test/nsphere/nsphere-circle.cpp index f4ae392e2..bec8a876a 100644 --- a/extensions/test/nsphere/nsphere-circle.cpp +++ b/extensions/test/nsphere/nsphere-circle.cpp @@ -100,8 +100,8 @@ struct radius_access template void check_nsphere(S& to_check, RT radius, CT center_x, CT center_y, CT center_z) { - BOOST_CONCEPT_ASSERT( (bg::concept::ConstNsphere) ); - BOOST_CONCEPT_ASSERT( (bg::concept::Nsphere) ); + BOOST_CONCEPT_ASSERT( (bg::concepts::ConstNsphere) ); + BOOST_CONCEPT_ASSERT( (bg::concepts::Nsphere) ); BOOST_CHECK_EQUAL(bg::get_radius<0>(to_check), radius); From c6695f125de356283b31ebb1e492f55579050f93 Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Fri, 13 Jan 2017 23:12:18 +0100 Subject: [PATCH 2/3] [test][arithmetic] Move cross_product test from extensions. --- extensions/test/Jamfile.v2 | 2 +- extensions/test/arithmetic/Jamfile.v2 | 20 ------------------- test/arithmetic/Jamfile.v2 | 8 +++++--- .../arithmetic/cross_product.cpp | 15 ++++++++------ 4 files changed, 15 insertions(+), 30 deletions(-) delete mode 100644 extensions/test/arithmetic/Jamfile.v2 rename {extensions/test => test}/arithmetic/cross_product.cpp (81%) diff --git a/extensions/test/Jamfile.v2 b/extensions/test/Jamfile.v2 index 1f23bf83f..f35b9a1f9 100644 --- a/extensions/test/Jamfile.v2 +++ b/extensions/test/Jamfile.v2 @@ -3,6 +3,7 @@ # 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) 2013-2017 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 @@ -23,7 +24,6 @@ project boost-geometry-extensions-test ; build-project algorithms ; -build-project arithmetic ; build-project gis ; build-project iterators ; build-project nsphere ; diff --git a/extensions/test/arithmetic/Jamfile.v2 b/extensions/test/arithmetic/Jamfile.v2 deleted file mode 100644 index f4b9447d6..000000000 --- a/extensions/test/arithmetic/Jamfile.v2 +++ /dev/null @@ -1,20 +0,0 @@ -# Boost.Geometry (aka GGL, Generic Geometry Library) -# -# 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. -# -# 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-extensions-arithmetic - : - [ run cross_product.cpp ] - [ compile-fail cross_product.cpp - : # requirements - TEST_FAIL_CROSS_PRODUCT - : # target name - cross_product_compile_fail - ] - ; diff --git a/test/arithmetic/Jamfile.v2 b/test/arithmetic/Jamfile.v2 index 23a11b2bd..9e108104a 100644 --- a/test/arithmetic/Jamfile.v2 +++ b/test/arithmetic/Jamfile.v2 @@ -3,7 +3,7 @@ # Copyright (c) 2007-2015 Barend Gehrels, Amsterdam, the Netherlands. # Copyright (c) 2008-2015 Bruno Lalande, Paris, France. # Copyright (c) 2009-2015 Mateusz Loskot, London, UK. -# Copyright (c) 2015 Adam Wulkiewicz, Lodz, Poland. +# Copyright (c) 2015-2017 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 @@ -11,6 +11,8 @@ test-suite boost-geometry-arithmetic : - [ run general.cpp : : : : arithmetic_general ] - [ run dot_product.cpp : : : : arithmetic_dot_product ] + [ run general.cpp : : : : arithmetic_general ] + [ run dot_product.cpp : : : : arithmetic_dot_product ] + [ run cross_product.cpp : : : : arithmetic_cross_product ] + [ compile-fail cross_product.cpp : TEST_FAIL_CROSS_PRODUCT : arithmetic_cross_product_cf ] ; diff --git a/extensions/test/arithmetic/cross_product.cpp b/test/arithmetic/cross_product.cpp similarity index 81% rename from extensions/test/arithmetic/cross_product.cpp rename to test/arithmetic/cross_product.cpp index 5a8f297d0..e53662861 100644 --- a/extensions/test/arithmetic/cross_product.cpp +++ b/test/arithmetic/cross_product.cpp @@ -2,6 +2,7 @@ // Unit Test // Copyright (c) 2009-2012 Mateusz Loskot, London, UK. +// Copyright (c) 2017 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 @@ -10,7 +11,7 @@ #include -#include +#include #include @@ -53,9 +54,11 @@ template void test_4d() { P p1; - bg::assign_values(p1, 20, 30, 10, 15); + bg::assign_values(p1, 20, 30, 10); + bg::set<3>(p1, 15); P p2; - bg::assign_values(p2, 45, 70, 20, 35); + bg::assign_values(p2, 45, 70, 20); + bg::set<3>(p2, 35); P c = bg::cross_product(p1, p2); } #endif @@ -71,9 +74,9 @@ int test_main(int, char* []) test_3d >(); #ifdef TEST_FAIL_CROSS_PRODUCT - test_4d >(); - test_4d >(); - test_4d >(); + test_4d >(); + test_4d >(); + test_4d >(); #endif return 0; From 8fa80c52b4841cfff8c0d00995b380e890896389 Mon Sep 17 00:00:00 2001 From: barendgehrels Date: Wed, 18 Jan 2017 10:05:56 +0100 Subject: [PATCH 3/3] Rename op to turn_op to avoid warning --- .../boost/geometry/algorithms/detail/overlay/traversal.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/boost/geometry/algorithms/detail/overlay/traversal.hpp b/include/boost/geometry/algorithms/detail/overlay/traversal.hpp index 5adc0fcf6..bc828920e 100644 --- a/include/boost/geometry/algorithms/detail/overlay/traversal.hpp +++ b/include/boost/geometry/algorithms/detail/overlay/traversal.hpp @@ -140,10 +140,10 @@ struct traversal { for (int i = 0; i < 2; i++) { - turn_operation_type& op = turn.operations[i]; - if (op.visited.none()) + turn_operation_type& turn_op = turn.operations[i]; + if (turn_op.visited.none()) { - op.visited.set_visited(); + turn_op.visited.set_visited(); } } }