]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/geometry/test/algorithms/buffer/buffer_linestring_aimes.cpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / geometry / test / algorithms / buffer / buffer_linestring_aimes.cpp
index e14954466f12a693e2366667caf00632cebcbde3..3850b11fe1a6b234b36dc7149ea4acb31e2382dd 100644 (file)
@@ -7,7 +7,7 @@
 // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-#include <test_buffer.hpp>
+#include "test_buffer.hpp"
 
 #include <boost/geometry/algorithms/buffer.hpp>
 
@@ -423,6 +423,15 @@ void test_aimes()
 
     typedef bg::model::linestring<P> linestring;
     typedef bg::model::polygon<P> polygon;
+    typedef typename bg::coordinate_type<P>::type coor_type;
+
+    if (BOOST_GEOMETRY_CONDITION((boost::is_same<coor_type, float>::value)))
+    {
+      std::cout << "This unit test can't be tested with float,"
+                << " the coordinate values are too small." << std::endl;
+      return;
+    }
+
 
     int const n = sizeof(testcases) / sizeof(testcases[0]);
     int const ne = sizeof(expectations) / sizeof(expectations[0]);
@@ -446,13 +455,6 @@ void test_aimes()
         double aimes_width = static_cast<double>(width) / 1000000.0;
         for (int i = 0; i < n; i++)
         {
-#if ! defined(BOOST_GEOMETRY_USE_RESCALING) && ! defined(BOOST_GEOMETRY_TEST_FAILURES)
-            if (i > 10)
-            {
-                // Several cases (11,20,40 etc) are still reported as invalid
-                settings.test_validity = false;
-            }
-#endif
             std::ostringstream name;
             try
             {
@@ -485,5 +487,10 @@ int test_main(int, char* [])
 
     test_aimes<bg::model::point<default_test_type, 2, bg::cs::cartesian> >();
 
+#if defined(BOOST_GEOMETRY_TEST_FAILURES)
+    // Type float is not supported for these cases
+    BoostGeometryWriteExpectedFailures(BG_NO_FAILURES, BG_NO_FAILURES);
+#endif
+
     return 0;
 }