Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r86358 - trunk/libs/geometry/test/algorithms
From: barend.gehrels_at_[hidden]
Date: 2013-10-18 16:48:31


Author: barendgehrels
Date: 2013-10-18 16:48:31 EDT (Fri, 18 Oct 2013)
New Revision: 86358
URL: http://svn.boost.org/trac/boost/changeset/86358

Log:
[geometry] fixed tests for clang >= 3.2 w.r.t. std::abs and unsigned

Text files modified:
   trunk/libs/geometry/test/algorithms/test_difference.hpp | 4 ++--
   trunk/libs/geometry/test/algorithms/test_intersection.hpp | 10 +++++-----
   trunk/libs/geometry/test/algorithms/test_union.hpp | 4 ++--
   3 files changed, 9 insertions(+), 9 deletions(-)

Modified: trunk/libs/geometry/test/algorithms/test_difference.hpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/test_difference.hpp Fri Oct 18 14:54:14 2013 (r86357)
+++ trunk/libs/geometry/test/algorithms/test_difference.hpp 2013-10-18 16:48:31 EDT (Fri, 18 Oct 2013) (r86358)
@@ -101,7 +101,7 @@
     }
 
     typename bg::default_area_result<G1>::type area = 0;
- std::size_t n = 0;
+ int n = 0;
     for (typename std::vector<OutputType>::iterator it = clip.begin();
             it != clip.end();
             ++it)
@@ -140,7 +140,7 @@
 #if ! defined(BOOST_GEOMETRY_NO_BOOST_TEST)
     if (expected_point_count >= 0)
     {
- BOOST_CHECK_MESSAGE(std::abs(n - expected_point_count) < 3,
+ BOOST_CHECK_MESSAGE(bg::math::abs(n - expected_point_count) < 3,
                 "difference: " << caseid
                 << " #points expected: " << expected_point_count
                 << " detected: " << n

Modified: trunk/libs/geometry/test/algorithms/test_intersection.hpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/test_intersection.hpp Fri Oct 18 14:54:14 2013 (r86357)
+++ trunk/libs/geometry/test/algorithms/test_intersection.hpp 2013-10-18 16:48:31 EDT (Fri, 18 Oct 2013) (r86358)
@@ -37,7 +37,7 @@
 template <typename OutputType, typename CalculationType, typename G1, typename G2>
 typename bg::default_area_result<G1>::type test_intersection(std::string const& caseid,
         G1 const& g1, G2 const& g2,
- std::size_t expected_count = 0, std::size_t expected_point_count = 0,
+ std::size_t expected_count = 0, int expected_point_count = 0,
         double expected_length_or_area = 0,
         double percentage = 0.0001,
         bool debug = false)
@@ -73,7 +73,7 @@
 
 
     typename bg::default_area_result<G1>::type length_or_area = 0;
- std::size_t n = 0;
+ int n = 0;
     for (typename std::vector<OutputType>::iterator it = clip.begin();
             it != clip.end();
             ++it)
@@ -98,7 +98,7 @@
 #if ! defined(BOOST_GEOMETRY_NO_BOOST_TEST)
     if (expected_point_count > 0)
     {
- BOOST_CHECK_MESSAGE(std::abs(n - expected_point_count) < 3,
+ BOOST_CHECK_MESSAGE(bg::math::abs(n - expected_point_count) < 3,
                 "intersection: " << caseid
                 << " #points expected: " << expected_point_count
                 << " detected: " << n
@@ -173,7 +173,7 @@
 template <typename OutputType, typename G1, typename G2>
 typename bg::default_area_result<G1>::type test_one(std::string const& caseid,
         std::string const& wkt1, std::string const& wkt2,
- std::size_t expected_count = 0, std::size_t expected_point_count = 0,
+ std::size_t expected_count = 0, int expected_point_count = 0,
         double expected_length_or_area = 0,
         double percentage = 0.0001,
         bool debug = false)
@@ -197,7 +197,7 @@
 template <typename OutputType, typename Areal, typename Linear>
 void test_one_lp(std::string const& caseid,
         std::string const& wkt_areal, std::string const& wkt_linear,
- std::size_t expected_count = 0, std::size_t expected_point_count = 0,
+ std::size_t expected_count = 0, int expected_point_count = 0,
         double expected_length = 0,
         double percentage = 0.0001,
         bool debug1 = false, bool debug2 = false)

Modified: trunk/libs/geometry/test/algorithms/test_union.hpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/test_union.hpp Fri Oct 18 14:54:14 2013 (r86357)
+++ trunk/libs/geometry/test/algorithms/test_union.hpp 2013-10-18 16:48:31 EDT (Fri, 18 Oct 2013) (r86358)
@@ -46,7 +46,7 @@
     bg::union_(g1, g2, clip);
 
     typename bg::default_area_result<G1>::type area = 0;
- std::size_t n = 0;
+ int n = 0;
     std::size_t holes = 0;
     for (typename std::vector<OutputType>::iterator it = clip.begin();
             it != clip.end(); ++it)
@@ -92,7 +92,7 @@
 
     if (expected_point_count >= 0)
     {
- BOOST_CHECK_MESSAGE(std::abs(int(n) - expected_point_count) < 3,
+ BOOST_CHECK_MESSAGE(bg::math::abs(n - expected_point_count) < 3,
                 "union: " << caseid
                 << " #points expected: " << expected_point_count
                 << " detected: " << n


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk