Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63708 - sandbox/geometry/libs/geometry/test/extensions/gis/latlong
From: barend.gehrels_at_[hidden]
Date: 2010-07-06 17:11:31


Author: barendgehrels
Date: 2010-07-06 17:11:31 EDT (Tue, 06 Jul 2010)
New Revision: 63708
URL: http://svn.boost.org/trac/boost/changeset/63708

Log:
Fixes today's return_type change
Text files modified:
   sandbox/geometry/libs/geometry/test/extensions/gis/latlong/andoyer.cpp | 17 ++++++++---------
   sandbox/geometry/libs/geometry/test/extensions/gis/latlong/vincenty.cpp | 22 ++++++++++------------
   2 files changed, 18 insertions(+), 21 deletions(-)

Modified: sandbox/geometry/libs/geometry/test/extensions/gis/latlong/andoyer.cpp
==============================================================================
--- sandbox/geometry/libs/geometry/test/extensions/gis/latlong/andoyer.cpp (original)
+++ sandbox/geometry/libs/geometry/test/extensions/gis/latlong/andoyer.cpp 2010-07-06 17:11:31 EDT (Tue, 06 Jul 2010)
@@ -18,21 +18,23 @@
 #include <boost/geometry/geometries/point.hpp>
 #include <test_common/test_point.hpp>
 
+namespace bg = boost::geometry;
+
 
 template <typename P1, typename P2>
 void test_andoyer(double lon1, double lat1, double lon2, double lat2, double expected_km)
 {
- typedef boost::geometry::strategy::distance::andoyer<P1, P2> andoyer_type;
+ typedef bg::strategy::distance::andoyer<P1, P2> andoyer_type;
 
- BOOST_CONCEPT_ASSERT( (boost::geometry::concept::PointDistanceStrategy<andoyer_type>) );
+ BOOST_CONCEPT_ASSERT( (bg::concept::PointDistanceStrategy<andoyer_type>) );
 
     andoyer_type andoyer;
 
 
     P1 p1, p2;
 
- boost::geometry::assign(p1, lon1, lat1);
- boost::geometry::assign(p2, lon2, lat2);
+ bg::assign(p1, lon1, lat1);
+ bg::assign(p2, lon2, lat2);
 
     BOOST_CHECK_CLOSE(double(andoyer.apply(p1, p2)), 1000.0 * expected_km, 0.001);
 }
@@ -53,13 +55,10 @@
 
 int test_main(int, char* [])
 {
- using namespace boost::geometry;
- using namespace boost::geometry::cs;
-
     //test_all<float[2]>();
     //test_all<double[2]>();
- test_all<point<float, 2, geographic<degree> > >();
- test_all<point<double, 2, geographic<degree> > >();
+ test_all<bg::point<float, 2, bg::cs::geographic<bg::degree> > >();
+ test_all<bg::point<double, 2, bg::cs::geographic<bg::degree> > >();
 
     return 0;
 }

Modified: sandbox/geometry/libs/geometry/test/extensions/gis/latlong/vincenty.cpp
==============================================================================
--- sandbox/geometry/libs/geometry/test/extensions/gis/latlong/vincenty.cpp (original)
+++ sandbox/geometry/libs/geometry/test/extensions/gis/latlong/vincenty.cpp 2010-07-06 17:11:31 EDT (Tue, 06 Jul 2010)
@@ -22,23 +22,23 @@
 # include <boost/geometry/extensions/contrib/ttmath_stub.hpp>
 #endif
 
-
+namespace bg = boost::geometry;
 
 template <typename P1, typename P2>
 void test_vincenty(double lon1, double lat1, double lon2, double lat2, double expected_km)
 {
- typedef boost::geometry::strategy::distance::vincenty<P1, P2> vincenty_type;
+ typedef bg::strategy::distance::vincenty<P1, P2> vincenty_type;
 
- BOOST_CONCEPT_ASSERT( (boost::geometry::concept::PointDistanceStrategy<vincenty_type>) );
+ BOOST_CONCEPT_ASSERT( (bg::concept::PointDistanceStrategy<vincenty_type>) );
 
     vincenty_type vincenty;
- typedef typename vincenty_type::return_type return_type;
+ typedef bg::strategy::distance::services::return_type<vincenty_type>::type return_type;
 
 
     P1 p1, p2;
 
- boost::geometry::assign(p1, lon1, lat1);
- boost::geometry::assign(p2, lon2, lat2);
+ bg::assign(p1, lon1, lat1);
+ bg::assign(p2, lon2, lat2);
 
     BOOST_CHECK_CLOSE(vincenty.apply(p1, p2), return_type(1000.0) * return_type(expected_km), 0.001);
 }
@@ -59,18 +59,16 @@
 
 int test_main(int, char* [])
 {
- using namespace boost::geometry;
- using namespace boost::geometry::cs;
 
     //test_all<float[2]>();
     //test_all<double[2]>();
- test_all<point<int, 2, geographic<degree> > >();
+ test_all<bg::point<int, 2, bg::cs::geographic<bg::degree> > >();
     //test_all<point<float, 2, geographic<degree> > >();
- test_all<point<double, 2, geographic<degree> > >();
+ test_all<bg::point<double, 2, bg::cs::geographic<bg::degree> > >();
 
 #if defined(HAVE_TTMATH)
- test_all<point<ttmath::Big<1,4>, 2, geographic<degree> > >();
- test_all<point<ttmath_big, 2, geographic<degree> > >();
+ test_all<bg::point<ttmath::Big<1,4>, 2, bg::cs::geographic<bg::degree> > >();
+ test_all<bg::point<ttmath_big, 2, bg::cs::geographic<bg::degree> > >();
 #endif
 
 


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