Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r78622 - in trunk/libs/geometry/test: core geometries views
From: barend.gehrels_at_[hidden]
Date: 2012-05-25 12:10:30


Author: barendgehrels
Date: 2012-05-25 12:10:29 EDT (Fri, 25 May 2012)
New Revision: 78622
URL: http://svn.boost.org/trac/boost/changeset/78622

Log:
Update w.r.t. Boost.Range size now unsigned - remove warnings (in unit tests)
Text files modified:
   trunk/libs/geometry/test/core/ring.cpp | 8 ++++----
   trunk/libs/geometry/test/geometries/adapted.cpp | 2 +-
   trunk/libs/geometry/test/geometries/custom_linestring.cpp | 6 +++---
   trunk/libs/geometry/test/views/closeable_view.cpp | 2 +-
   4 files changed, 9 insertions(+), 9 deletions(-)

Modified: trunk/libs/geometry/test/core/ring.cpp
==============================================================================
--- trunk/libs/geometry/test/core/ring.cpp (original)
+++ trunk/libs/geometry/test/core/ring.cpp 2012-05-25 12:10:29 EDT (Fri, 25 May 2012)
@@ -34,9 +34,9 @@
 
 template <typename P>
 void test_ring(std::string const& wkt,
- int expected_main_count,
- int expected_interior_ring_count,
- int expected_first_interior_count)
+ std::size_t expected_main_count,
+ std::size_t expected_interior_ring_count,
+ std::size_t expected_first_interior_count)
 {
     typedef bg::model::polygon<P> the_polygon;
     typedef typename bg::ring_type<the_polygon>::type the_ring;
@@ -48,7 +48,7 @@
     the_ring ext = bg::exterior_ring(poly);
     the_interior rings = bg::interior_rings(poly);
 
- BOOST_CHECK_EQUAL(bg::num_interior_rings(poly), std::size_t(expected_interior_ring_count));
+ BOOST_CHECK_EQUAL(bg::num_interior_rings(poly), expected_interior_ring_count);
     BOOST_CHECK_EQUAL(boost::size(rings), expected_interior_ring_count);
     BOOST_CHECK_EQUAL(boost::size(ext), expected_main_count);
     if (boost::size(rings))

Modified: trunk/libs/geometry/test/geometries/adapted.cpp
==============================================================================
--- trunk/libs/geometry/test/geometries/adapted.cpp (original)
+++ trunk/libs/geometry/test/geometries/adapted.cpp 2012-05-25 12:10:29 EDT (Fri, 25 May 2012)
@@ -58,7 +58,7 @@
 // ----------------------------------------------------------------------------
 
 template <typename G>
-void test_geometry(G const& geometry, int expected_size = 0)
+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>) );

Modified: trunk/libs/geometry/test/geometries/custom_linestring.cpp
==============================================================================
--- trunk/libs/geometry/test/geometries/custom_linestring.cpp (original)
+++ trunk/libs/geometry/test/geometries/custom_linestring.cpp 2012-05-25 12:10:29 EDT (Fri, 25 May 2012)
@@ -87,15 +87,15 @@
     typedef typename bg::point_type<G>::type P;
 
     bg::clear(geometry);
- BOOST_CHECK_EQUAL(boost::size(geometry), 0);
+ BOOST_CHECK_EQUAL(boost::size(geometry), 0u);
 
     bg::append(geometry, bg::make_zero<P>());
- BOOST_CHECK_EQUAL(boost::size(geometry), 1);
+ BOOST_CHECK_EQUAL(boost::size(geometry), 1u);
 
     //std::cout << geometry << std::endl;
 
     bg::clear(geometry);
- BOOST_CHECK_EQUAL(boost::size(geometry), 0);
+ BOOST_CHECK_EQUAL(boost::size(geometry), 0u);
 
 
     //P p = boost::range::front(geometry);

Modified: trunk/libs/geometry/test/views/closeable_view.cpp
==============================================================================
--- trunk/libs/geometry/test/views/closeable_view.cpp (original)
+++ trunk/libs/geometry/test/views/closeable_view.cpp 2012-05-25 12:10:29 EDT (Fri, 25 May 2012)
@@ -76,7 +76,7 @@
     it += 2;
     BOOST_CHECK_EQUAL(*it, 1);
 
- BOOST_CHECK_EQUAL(boost::size(view), 4);
+ BOOST_CHECK_EQUAL(boost::size(view), 4u);
 }
 
 


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