Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71213 - in trunk/libs/geometry/test: algorithms arithmetic geometries strategies util
From: barend.gehrels_at_[hidden]
Date: 2011-04-12 16:14:58


Author: barendgehrels
Date: 2011-04-12 16:14:55 EDT (Tue, 12 Apr 2011)
New Revision: 71213
URL: http://svn.boost.org/trac/boost/changeset/71213

Log:
Updated tests (assign -> assign_values)
Text files modified:
   trunk/libs/geometry/test/algorithms/intersection.cpp | 2 +-
   trunk/libs/geometry/test/algorithms/transform.cpp | 4 ++--
   trunk/libs/geometry/test/arithmetic/arithmetic.cpp | 18 +++++++++---------
   trunk/libs/geometry/test/arithmetic/dot_product.cpp | 4 ++--
   trunk/libs/geometry/test/geometries/boost_polygon.cpp | 4 ++--
   trunk/libs/geometry/test/geometries/box.cpp | 4 ++--
   trunk/libs/geometry/test/strategies/cross_track.cpp | 6 +++---
   trunk/libs/geometry/test/strategies/haversine.cpp | 12 ++++++------
   trunk/libs/geometry/test/strategies/projected_point.cpp | 6 +++---
   trunk/libs/geometry/test/strategies/pythagoras.cpp | 28 ++++++++++++++--------------
   trunk/libs/geometry/test/strategies/segment_intersection.cpp | 8 ++++----
   trunk/libs/geometry/test/strategies/segment_intersection_collinear.cpp | 8 ++++----
   trunk/libs/geometry/test/strategies/side_by_cross_track.cpp | 6 +++---
   trunk/libs/geometry/test/strategies/transformer.cpp | 2 +-
   trunk/libs/geometry/test/util/for_each_coordinate.cpp | 2 +-
   15 files changed, 57 insertions(+), 57 deletions(-)

Modified: trunk/libs/geometry/test/algorithms/intersection.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/intersection.cpp (original)
+++ trunk/libs/geometry/test/algorithms/intersection.cpp 2011-04-12 16:14:55 EDT (Tue, 12 Apr 2011)
@@ -324,7 +324,7 @@
     p = new test::test_point_xy; p->x = 10; p->y = 10; ln.push_back(p);
 
     bg::model::box<bg::model::d2::point_xy<double> > box;
- bg::assign(box, 2, 2, 8, 8);
+ bg::assign_values(box, 2, 2, 8, 8);
 
     typedef bg::model::linestring<bg::model::d2::point_xy<double> > output_type;
     std::vector<output_type> clip;

Modified: trunk/libs/geometry/test/algorithms/transform.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/transform.cpp (original)
+++ trunk/libs/geometry/test/algorithms/transform.cpp 2011-04-12 16:14:55 EDT (Tue, 12 Apr 2011)
@@ -80,7 +80,7 @@
     {
         typedef bg::model::point<T, 3, bg::cs::spherical<DegreeOrRadian> > spherical_type;
         spherical_type sph1;
- assign(sph1, phi, theta, r);
+ assign_values(sph1, phi, theta, r);
         BOOST_CHECK(transform(sph1, p));
 
         spherical_type sph2;
@@ -97,7 +97,7 @@
     {
         typedef bg::model::point<T, 2, bg::cs::spherical<DegreeOrRadian> > spherical_type;
         spherical_type sph1, sph2;
- assign(sph1, phi, theta);
+ assign_values(sph1, phi, theta);
         BOOST_CHECK(transform(sph1, p));
         BOOST_CHECK(transform(p, sph2));
 

Modified: trunk/libs/geometry/test/arithmetic/arithmetic.cpp
==============================================================================
--- trunk/libs/geometry/test/arithmetic/arithmetic.cpp (original)
+++ trunk/libs/geometry/test/arithmetic/arithmetic.cpp 2011-04-12 16:14:55 EDT (Tue, 12 Apr 2011)
@@ -30,14 +30,14 @@
 void test_addition()
 {
     P p1;
- bg::assign(p1, 1, 2, 3);
+ bg::assign_values(p1, 1, 2, 3);
     bg::add_value(p1, 10);
     BOOST_CHECK(bg::get<0>(p1) == 11);
     BOOST_CHECK(bg::get<1>(p1) == 12);
     BOOST_CHECK(bg::get<2>(p1) == 13);
 
     P p2;
- bg::assign(p2, 4, 5, 6);
+ bg::assign_values(p2, 4, 5, 6);
     bg::add_point(p1, p2);
     BOOST_CHECK(bg::get<0>(p1) == 15);
     BOOST_CHECK(bg::get<1>(p1) == 17);
@@ -48,14 +48,14 @@
 void test_subtraction()
 {
     P p1;
- bg::assign(p1, 1, 2, 3);
+ bg::assign_values(p1, 1, 2, 3);
     bg::subtract_value(p1, 10);
     BOOST_CHECK(bg::get<0>(p1) == -9);
     BOOST_CHECK(bg::get<1>(p1) == -8);
     BOOST_CHECK(bg::get<2>(p1) == -7);
 
     P p2;
- bg::assign(p2, 4, 6, 8);
+ bg::assign_values(p2, 4, 6, 8);
     bg::subtract_point(p1, p2);
     BOOST_CHECK(bg::get<0>(p1) == -13);
     BOOST_CHECK(bg::get<1>(p1) == -14);
@@ -66,14 +66,14 @@
 void test_multiplication()
 {
     P p1;
- bg::assign(p1, 1, 2, 3);
+ bg::assign_values(p1, 1, 2, 3);
     bg::multiply_value(p1, 5);
     BOOST_CHECK(bg::get<0>(p1) == 5);
     BOOST_CHECK(bg::get<1>(p1) == 10);
     BOOST_CHECK(bg::get<2>(p1) == 15);
 
     P p2;
- bg::assign(p2, 4, 5, 6);
+ bg::assign_values(p2, 4, 5, 6);
     bg::multiply_point(p1, p2);
     BOOST_CHECK(bg::get<0>(p1) == 20);
     BOOST_CHECK(bg::get<1>(p1) == 50);
@@ -84,14 +84,14 @@
 void test_division()
 {
     P p1;
- bg::assign(p1, 50, 100, 150);
+ bg::assign_values(p1, 50, 100, 150);
     bg::divide_value(p1, 5);
     BOOST_CHECK(bg::get<0>(p1) == 10);
     BOOST_CHECK(bg::get<1>(p1) == 20);
     BOOST_CHECK(bg::get<2>(p1) == 30);
 
     P p2;
- bg::assign(p2, 2, 4, 6);
+ bg::assign_values(p2, 2, 4, 6);
     bg::divide_point(p1, p2);
     BOOST_CHECK(bg::get<0>(p1) == 5);
     BOOST_CHECK(bg::get<1>(p1) == 5);
@@ -103,7 +103,7 @@
 {
     P p1;
     P p2;
- bg::assign(p1, 12, 34, 56);
+ bg::assign_values(p1, 12, 34, 56);
     bg::assign_point(p2, p1);
     BOOST_CHECK(bg::get<0>(p2) == 12);
     BOOST_CHECK(bg::get<1>(p2) == 34);

Modified: trunk/libs/geometry/test/arithmetic/dot_product.cpp
==============================================================================
--- trunk/libs/geometry/test/arithmetic/dot_product.cpp (original)
+++ trunk/libs/geometry/test/arithmetic/dot_product.cpp 2011-04-12 16:14:55 EDT (Tue, 12 Apr 2011)
@@ -30,9 +30,9 @@
 void test_all()
 {
     P p1;
- bg::assign(p1, 1, 2, 3);
+ bg::assign_values(p1, 1, 2, 3);
     P p2;
- bg::assign(p2, 4, 5, 6);
+ bg::assign_values(p2, 4, 5, 6);
     BOOST_CHECK(bg::dot_product(p1, p2) == 1*4 + 2*5 + 3*6);
 }
 

Modified: trunk/libs/geometry/test/geometries/boost_polygon.cpp
==============================================================================
--- trunk/libs/geometry/test/geometries/boost_polygon.cpp (original)
+++ trunk/libs/geometry/test/geometries/boost_polygon.cpp 2011-04-12 16:14:55 EDT (Tue, 12 Apr 2011)
@@ -77,8 +77,8 @@
     boost::polygon::rectangle_data<T> boost_polygon_box;
     bg::model::box<bg_point_type> boost_geometry_box;
 
- bg::assign(boost_polygon_box, 0, 1, 5, 6);
- bg::assign(boost_geometry_box, 0, 1, 5, 6);
+ bg::assign_values(boost_polygon_box, 0, 1, 5, 6);
+ bg::assign_values(boost_geometry_box, 0, 1, 5, 6);
     T boost_polygon_area = bg::area(boost_polygon_box);
     T boost_geometry_area = bg::area(boost_geometry_box);
     T boost_polygon_area_by_boost_polygon = boost::polygon::area(boost_polygon_box);

Modified: trunk/libs/geometry/test/geometries/box.cpp
==============================================================================
--- trunk/libs/geometry/test/geometries/box.cpp (original)
+++ trunk/libs/geometry/test/geometries/box.cpp 2011-04-12 16:14:55 EDT (Tue, 12 Apr 2011)
@@ -30,8 +30,8 @@
 {
     P p1;
     P p2;
- bg::assign(p1, 1, 2, 5);
- bg::assign(p2, 3, 4, 6);
+ bg::assign_values(p1, 1, 2, 5);
+ bg::assign_values(p2, 3, 4, 6);
     return bg::model::box<P>(p1, p2);
 }
 

Modified: trunk/libs/geometry/test/strategies/cross_track.cpp
==============================================================================
--- trunk/libs/geometry/test/strategies/cross_track.cpp (original)
+++ trunk/libs/geometry/test/strategies/cross_track.cpp 2011-04-12 16:14:55 EDT (Tue, 12 Apr 2011)
@@ -60,9 +60,9 @@
 
 
     Point p1, p2, p3;
- bg::assign(p1, lon1, lat1);
- bg::assign(p2, lon2, lat2);
- bg::assign(p3, lon3, lat3);
+ bg::assign_values(p1, lon1, lat1);
+ bg::assign_values(p2, lon2, lat2);
+ bg::assign_values(p3, lon3, lat3);
 
 
     strategy_type strategy;

Modified: trunk/libs/geometry/test/strategies/haversine.cpp
==============================================================================
--- trunk/libs/geometry/test/strategies/haversine.cpp (original)
+++ trunk/libs/geometry/test/strategies/haversine.cpp 2011-04-12 16:14:55 EDT (Tue, 12 Apr 2011)
@@ -60,8 +60,8 @@
         haversine_type strategy(radius);
 
         Point p1, p2;
- bg::assign(p1, lon1, lat1);
- bg::assign(p2, lon2, lat2);
+ bg::assign_values(p1, lon1, lat1);
+ bg::assign_values(p2, lon2, lat2);
         return_type d = strategy.apply(p1, p2);
 
         BOOST_CHECK_CLOSE(d, expected, tolerance);
@@ -102,10 +102,10 @@
     }
 
     P1 p1;
- bg::assign(p1, 4, 52);
+ bg::assign_values(p1, 4, 52);
 
     P2 p2;
- bg::assign(p2, 2, 48);
+ bg::assign_values(p2, 2, 48);
 
     // ~ Amsterdam/Paris, 467 kilometers
     double const km = 1000.0;
@@ -177,8 +177,8 @@
 {
     boost::timer t;
     P p1, p2;
- bg::assign(p1, 1, 1);
- bg::assign(p2, 2, 2);
+ bg::assign_values(p1, 1, 1);
+ bg::assign_values(p2, 2, 2);
     Strategy strategy;
     typename Strategy::return_type s = 0;
     for (int i = 0; i < n; i++)

Modified: trunk/libs/geometry/test/strategies/projected_point.cpp
==============================================================================
--- trunk/libs/geometry/test/strategies/projected_point.cpp (original)
+++ trunk/libs/geometry/test/strategies/projected_point.cpp 2011-04-12 16:14:55 EDT (Tue, 12 Apr 2011)
@@ -36,11 +36,11 @@
 void test_services()
 {
     PS p1, p2;
- bg::assign(p1, 0, 0);
- bg::assign(p2, 0, 4);
+ bg::assign_values(p1, 0, 0);
+ bg::assign_values(p2, 0, 4);
 
     P p;
- bg::assign(p, 2, 0);
+ bg::assign_values(p, 2, 0);
 
     CalculationType const sqr_expected = 4;
     CalculationType const expected = 2;

Modified: trunk/libs/geometry/test/strategies/pythagoras.cpp
==============================================================================
--- trunk/libs/geometry/test/strategies/pythagoras.cpp (original)
+++ trunk/libs/geometry/test/strategies/pythagoras.cpp 2011-04-12 16:14:55 EDT (Tue, 12 Apr 2011)
@@ -45,9 +45,9 @@
 void test_null_distance_3d()
 {
     P1 p1;
- bg::assign(p1, 1, 2, 3);
+ bg::assign_values(p1, 1, 2, 3);
     P2 p2;
- bg::assign(p2, 1, 2, 3);
+ bg::assign_values(p2, 1, 2, 3);
 
     typedef bg::strategy::distance::pythagoras<P1, P2> pythagoras_type;
     typedef typename bg::strategy::distance::services::return_type<pythagoras_type>::type return_type;
@@ -62,9 +62,9 @@
 void test_axis_3d()
 {
     P1 p1;
- bg::assign(p1, 0, 0, 0);
+ bg::assign_values(p1, 0, 0, 0);
     P2 p2;
- bg::assign(p2, 1, 0, 0);
+ bg::assign_values(p2, 1, 0, 0);
 
     typedef bg::strategy::distance::pythagoras<P1, P2> pythagoras_type;
     typedef typename bg::strategy::distance::services::return_type<pythagoras_type>::type return_type;
@@ -74,11 +74,11 @@
     return_type result = pythagoras.apply(p1, p2);
     BOOST_CHECK_EQUAL(result, return_type(1));
 
- bg::assign(p2, 0, 1, 0);
+ bg::assign_values(p2, 0, 1, 0);
     result = pythagoras.apply(p1, p2);
     BOOST_CHECK_EQUAL(result, return_type(1));
 
- bg::assign(p2, 0, 0, 1);
+ bg::assign_values(p2, 0, 0, 1);
     result = pythagoras.apply(p1, p2);
     BOOST_CHECK_CLOSE(result, return_type(1), 0.001);
 }
@@ -87,9 +87,9 @@
 void test_arbitrary_3d()
 {
     P1 p1;
- bg::assign(p1, 1, 2, 3);
+ bg::assign_values(p1, 1, 2, 3);
     P2 p2;
- bg::assign(p2, 9, 8, 7);
+ bg::assign_values(p2, 9, 8, 7);
 
     {
         typedef bg::strategy::distance::pythagoras<P1, P2> strategy_type;
@@ -125,10 +125,10 @@
 
 
     P1 p1;
- bg::assign(p1, 1, 2, 3);
+ bg::assign_values(p1, 1, 2, 3);
 
     P2 p2;
- bg::assign(p2, 4, 5, 6);
+ bg::assign_values(p2, 4, 5, 6);
 
     double const sqr_expected = 3*3 + 3*3 + 3*3; // 27
     double const expected = sqrt(sqr_expected); // sqrt(27)=5.1961524227
@@ -201,8 +201,8 @@
 
 
     point_type p1, p2;
- bg::assign(p1, x1, y1);
- bg::assign(p2, x2, y2);
+ bg::assign_values(p1, x1, y1);
+ bg::assign_values(p2, x2, y2);
     return_type d = pythagoras.apply(p1, p2);
 
     /***
@@ -258,8 +258,8 @@
 {
     boost::timer t;
     P p1, p2;
- bg::assign(p1, 1, 1);
- bg::assign(p2, 2, 2);
+ bg::assign_values(p1, 1, 1);
+ bg::assign_values(p2, 2, 2);
     Strategy strategy;
     typename bg::strategy::distance::services::return_type<Strategy>::type s = 0;
     for (int i = 0; i < n; i++)

Modified: trunk/libs/geometry/test/strategies/segment_intersection.cpp
==============================================================================
--- trunk/libs/geometry/test/strategies/segment_intersection.cpp (original)
+++ trunk/libs/geometry/test/strategies/segment_intersection.cpp 2011-04-12 16:14:55 EDT (Tue, 12 Apr 2011)
@@ -93,10 +93,10 @@
     typedef segment<const P> segment_type;
 
     P p1, p2, p3, p4;
- bg::assign(p1, x1, y1);
- bg::assign(p2, x2, y2);
- bg::assign(p3, x3, y3);
- bg::assign(p4, x4, y4);
+ bg::assign_values(p1, x1, y1);
+ bg::assign_values(p2, x2, y2);
+ bg::assign_values(p3, x3, y3);
+ bg::assign_values(p4, x4, y4);
 
     segment_type s12(p1,p2);
     segment_type s34(p3,p4);

Modified: trunk/libs/geometry/test/strategies/segment_intersection_collinear.cpp
==============================================================================
--- trunk/libs/geometry/test/strategies/segment_intersection_collinear.cpp (original)
+++ trunk/libs/geometry/test/strategies/segment_intersection_collinear.cpp 2011-04-12 16:14:55 EDT (Tue, 12 Apr 2011)
@@ -67,10 +67,10 @@
     typedef bg::segment<const P> segment_type;
 
     P p1, p2, p3, p4;
- bg::assign(p1, x1, y1);
- bg::assign(p2, x2, y2);
- bg::assign(p3, x3, y3);
- bg::assign(p4, x4, y4);
+ bg::assign_values(p1, x1, y1);
+ bg::assign_values(p2, x2, y2);
+ bg::assign_values(p3, x3, y3);
+ bg::assign_values(p4, x4, y4);
 
     segment_type s12(p1,p2);
     segment_type s34(p3,p4);

Modified: trunk/libs/geometry/test/strategies/side_by_cross_track.cpp
==============================================================================
--- trunk/libs/geometry/test/strategies/side_by_cross_track.cpp (original)
+++ trunk/libs/geometry/test/strategies/side_by_cross_track.cpp 2011-04-12 16:14:55 EDT (Tue, 12 Apr 2011)
@@ -29,9 +29,9 @@
     typedef bg::strategy::side::side_by_cross_track<double> strategy;
 
     Point p1, p2, p3;
- bg::assign(p1, lon1, lat1);
- bg::assign(p2, lon2, lat2);
- bg::assign(p3, lon3, lat3);
+ bg::assign_values(p1, lon1, lat1);
+ bg::assign_values(p2, lon2, lat2);
+ bg::assign_values(p3, lon3, lat3);
     int s = strategy::apply(p1, p2, p3);
 
 }

Modified: trunk/libs/geometry/test/strategies/transformer.cpp
==============================================================================
--- trunk/libs/geometry/test/strategies/transformer.cpp (original)
+++ trunk/libs/geometry/test/strategies/transformer.cpp 2011-04-12 16:14:55 EDT (Tue, 12 Apr 2011)
@@ -46,7 +46,7 @@
 void test_all()
 {
     P p;
- bg::assign(p, 1, 1);
+ bg::assign_values(p, 1, 1);
 
     {
         bg::strategy::transform::translate_transformer<P, P> trans(1, 1);

Modified: trunk/libs/geometry/test/util/for_each_coordinate.cpp
==============================================================================
--- trunk/libs/geometry/test/util/for_each_coordinate.cpp (original)
+++ trunk/libs/geometry/test/util/for_each_coordinate.cpp 2011-04-12 16:14:55 EDT (Tue, 12 Apr 2011)
@@ -55,7 +55,7 @@
 void test_all()
 {
     P p;
- bg::assign(p, 1, 2, 3);
+ bg::assign_values(p, 1, 2, 3);
     bg::for_each_coordinate(p, test_operation());
     BOOST_CHECK(bg::get<0>(p) == 10);
     BOOST_CHECK(bg::get<1>(p) == 20);


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