Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r86591 - trunk/libs/geometry/test/algorithms
From: barend.gehrels_at_[hidden]
Date: 2013-11-09 06:18:35


Author: barendgehrels
Date: 2013-11-09 06:18:34 EST (Sat, 09 Nov 2013)
New Revision: 86591
URL: http://svn.boost.org/trac/boost/changeset/86591

Log:
[geometry] fixed multi_simplify test which suffered from too many decimals in the test-output

Text files modified:
   trunk/libs/geometry/test/algorithms/test_simplify.hpp | 8 +++++---
   1 files changed, 5 insertions(+), 3 deletions(-)

Modified: trunk/libs/geometry/test/algorithms/test_simplify.hpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/test_simplify.hpp Sat Nov 9 05:58:51 2013 (r86590)
+++ trunk/libs/geometry/test/algorithms/test_simplify.hpp 2013-11-09 06:18:34 EST (Sat, 09 Nov 2013) (r86591)
@@ -37,7 +37,9 @@
             std::back_inserter(simplified), distance);
 
         std::ostringstream out;
- out << std::setprecision(16) << bg::wkt(simplified);
+ // TODO: instead of comparing the full string (with more or less decimal digits),
+ // we should call something more robust to check the test for example geometry::equals
+ out << std::setprecision(12) << bg::wkt(simplified);
         BOOST_CHECK_EQUAL(out.str(), expected);
     }
 };
@@ -55,7 +57,7 @@
 
     {
         std::ostringstream out;
- out << std::setprecision(16) << bg::wkt(simplified);
+ out << std::setprecision(12) << bg::wkt(simplified);
 
         BOOST_CHECK_MESSAGE(out.str() == expected,
             "simplify: " << bg::wkt(geometry)
@@ -78,7 +80,7 @@
 
     {
         std::ostringstream out;
- out << std::setprecision(16) << bg::wkt(simplified);
+ out << std::setprecision(12) << bg::wkt(simplified);
         BOOST_CHECK_EQUAL(out.str(), expected);
     }
 


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