|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r86337 - trunk/libs/geometry/test/algorithms
From: bruno.lalande_at_[hidden]
Date: 2013-10-17 02:17:51
Author: bruno.lalande
Date: 2013-10-17 02:17:50 EDT (Thu, 17 Oct 2013)
New Revision: 86337
URL: http://svn.boost.org/trac/boost/changeset/86337
Log:
Test for centroid's variant-awareness
Text files modified:
trunk/libs/geometry/test/algorithms/test_centroid.hpp | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
Modified: trunk/libs/geometry/test/algorithms/test_centroid.hpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/test_centroid.hpp Wed Oct 16 22:51:14 2013 (r86336)
+++ trunk/libs/geometry/test/algorithms/test_centroid.hpp 2013-10-17 02:17:50 EDT (Thu, 17 Oct 2013) (r86337)
@@ -11,6 +11,8 @@
// Test-functionality, shared between single and multi tests
+#include <boost/variant/variant.hpp>
+
#include <geometry_test_common.hpp>
#include <boost/geometry/strategies/strategies.hpp>
@@ -63,9 +65,13 @@
bg::read_wkt(wkt, geometry);
typedef typename bg::point_type<Geometry>::type point_type;
point_type c1;
+
bg::centroid(geometry, c1);
check_result<bg::dimension<Geometry>::type::value>::apply(c1, boost::make_tuple(d1, d2, d3, d4, d5));
+ boost::variant<Geometry> v(geometry);
+ bg::centroid(v, c1);
+
#ifdef REPORT_RESULTS
std::cout << "normal: " << std::setprecision(20) << bg::get<0>(c1) << " " << bg::get<1>(c1) << std::endl;
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