::type rg2;
-
- bg::svg_mapper mapper(svg, 1000, 800);
-
- mapper.add(g1);
- mapper.add(g2);
-
- // Input shapes in green/blue
- mapper.map(g1, "opacity:0.8;fill:rgb(0,255,0);"
- "stroke:rgb(0,0,0);stroke-width:1");
- mapper.map(g2, "opacity:0.8;fill:rgb(0,0,255);"
- "stroke:rgb(0,0,0);stroke-width:1");
-
- // Traversal rings in red
- for (typename out_vector::const_iterator it = boost::begin(v);
- it != boost::end(v);
- ++it)
- {
- mapper.map(*it, "fill-opacity:0.1;stroke-opacity:0.9;"
- "fill:rgb(255,0,0);stroke:rgb(255,0,0);stroke-width:5");
-
- std::cout << bg::wkt(*it) << std::endl;
- std::cout << bg::area(*it) << std::endl;
- }
-
- // IP's in orange
- for (iterator it = boost::begin(ips); it != boost::end(ips); ++it)
- {
- mapper.map(it->point, "fill:rgb(255,128,0);"
- "stroke:rgb(0,0,100);stroke-width:1");
- }
- }
-#endif
-}
-
-template
-void test_one(std::string const& caseid, std::string const& wkt1, std::string const& wkt2)
-{
- G1 g1;
- bg::read_wkt(wkt1, g1);
-
- G2 g2;
- bg::read_wkt(wkt2, g2);
-
- bg::correct(g1);
- bg::correct(g2);
- std::cout << "area1 " << bg::area(g1) << " " << " area2: " << bg::area(g2) << std::endl;
-
- test_traverse(caseid, g1, g2);
-}
-
-
-#if ! defined(GEOMETRY_TEST_MULTI)
-
-template
-void test_traverse_gmp(std::string const& caseid)
-{
- typedef bg::model::polygon polygon;
- std::cout << typeid(typename bg::coordinate_type
::type).name() << std::endl;
- std::cout << std::setprecision(30) << std::numeric_limits::epsilon() << std::endl;
- std::cout << std::setprecision(30) << std::numeric_limits::epsilon() << std::endl;
- std::cout << std::setprecision(30) << std::numeric_limits::epsilon() << std::endl;
-
- static std::string brandon[3] =
- {
- //37.43402099609375 1.470055103302002,
- "POLYGON((37.29449462890625 1.7902572154998779,37.000419616699219 1.664225697517395,37.140213012695313 1.3446992635726929,50.974888957147442 -30.277285722290763,57.297810222148939 -37.546793343968417,41.590042114257813 -7.2021245956420898,40.6978759765625 -5.4500408172607422,40.758884429931641 -5.418975830078125,42.577911376953125 -4.4901103973388672,42.577877044677734 -4.4900407791137695,42.699958801269531 -4.4278755187988281,46.523914387974358 -8.5152102535033496,47.585065917176543 -6.1314922196594779,45.389434814453125 -4.5143837928771973,46.296027072709599 -2.4984308554828116,37.29449462890625 1.7902572154998779))",
- "POLYGON((42.399410247802734 1.4956772327423096,42.721500396728516 2.2342472076416016,42.721500396728516 3.6584999561309814,51.20102152843122 7.1738039562841562,51.370888500897557 7.4163459734570729,37.43402099609375 1.470055103302002,37.29449462890625 1.7902572154998779,37.000419616699219 1.664225697517395,37.140213012695313 1.3446992635726929,36.954700469970703 1.2597870826721191,26.472516656201325 -3.5380830513658776,27.069889344709196 -4.2926591211028242,30.501169204711914 -2.3718316555023193,32.708126068115234 -2.3611266613006592,32.708126068115234 -2.3611700534820557,32.708168029785156 -2.3611698150634766,32.718830108642578 -4.3281683921813965,29.135100397190627 -8.9262827849488211,29.619997024536133 -9.5368013381958008,30.339155197143555 -8.9838371276855469,30.670633316040039 -8.8180980682373047,30.896280288696289 -9.1206979751586914,30.207040612748258 -10.275926149505661,30.947774887084961 -11.208560943603516,31.669155120849609 -10.653837203979492,32.000633239746094 -10.488097190856934,32.226280212402344 -10.790698051452637,31.682494778186321 -12.133624901803865,32.274600982666016 -12.879127502441406,32.998821258544922 -12.323249816894531,33.339523315429688 -12.147735595703125,33.566280364990234 -12.450697898864746,33.164891643669634 -14.000060288415174,33.598796844482422 -14.546377182006836,34.328716278076172 -13.992490768432617,34.658355712890625 -13.81736946105957,34.886280059814453 -14.120697975158691,34.634240447128811 -15.85007183479255,34.931102752685547 -16.223842620849609,35.656356811523438 -15.66030216217041,35.963497161865234 -15.476018905639648,37.326129913330078 -17.190576553344727,38.823680877685547 -16.296066284179688,39.966808319091797 -17.625011444091797,40.800632476806641 -17.208097457885742,41.821544647216797 -19.211688995361328,41.988733475572282 -19.945838749437218,57.524304765518266 -37.807195733984784,41.590042114257813 -7.2021245956420898,40.6978759765625 -5.4500408172607422,40.758884429931641 -5.418975830078125,42.577911376953125 -4.4901103973388672,42.577877044677734 -4.4900407791137695,42.699958801269531 -4.4278755187988281,46.559533858616469 -8.435196445683264,47.604561877161387 -6.087697464505224,45.389434814453125 -4.5143837928771973,46.695858001708984 -1.6093428134918213,47.263670054709685 -1.784876824891044,47.830955505371094 -0.69758313894271851,48.43512638981781 -0.81299959072453376,49.071769542946825 0.61489892713413252,43.764598846435547 0.93951499462127686,43.644271850585938 0.96149998903274536,42.399410247802734 1.4956772327423096))",
- "POLYGON((43.644271850585938 0.96149998903274536,43.764598846435547 0.93951499462127686,49.071769542946825 0.61489892713413252,48.43512638981781 -0.81299959072453376,47.830955505371094 -0.69758313894271851,47.263670054709685 -1.784876824891044,46.695858001708984 -1.6093428134918213,45.389434814453125 -4.5143837928771973,47.604561877161387 -6.087697464505224,46.559533858616469 -8.435196445683264,42.699958801269531 -4.4278755187988281,42.577877044677734 -4.4900407791137695,42.577911376953125 -4.4901103973388672,40.758884429931641 -5.418975830078125,40.6978759765625 -5.4500408172607422,41.590042114257813 -7.2021245956420898,57.524304765518266 -37.807195733984784,41.988733475572282 -19.945838749437218,41.821544647216797 -19.211688995361328,40.800632476806641 -17.208097457885742,39.966808319091797 -17.625011444091797,38.823680877685547 -16.296066284179688,37.326129913330078 -17.190576553344727,35.963497161865234 -15.476018905639648,35.656356811523438 -15.66030216217041,34.931102752685547 -16.223842620849609,34.634240447128811 -15.85007183479255,34.886280059814453 -14.120697975158691,34.658355712890625 -13.81736946105957,34.328716278076172 -13.992490768432617,33.598796844482422 -14.546377182006836,33.164891643669634 -14.000060288415174,33.566280364990234 -12.450697898864746,33.339523315429688 -12.147735595703125,32.998821258544922 -12.323249816894531,32.274600982666016 -12.879127502441406,31.682494778186321 -12.133624901803865,32.226280212402344 -10.790698051452637,32.000633239746094 -10.488097190856934,31.669155120849609 -10.653837203979492,30.947774887084961 -11.208560943603516,30.207040612748258 -10.275926149505661,30.896280288696289 -9.1206979751586914,30.670633316040039 -8.8180980682373047,30.339155197143555 -8.9838371276855469,29.619997024536133 -9.5368013381958008,29.135100397190627 -8.9262827849488211,32.718830108642578 -4.3281683921813965,32.708168029785156 -2.3611698150634766,32.708126068115234 -2.3611700534820557,32.708126068115234 -2.3611266613006592,30.501169204711914 -2.3718316555023193,27.069889344709196 -4.2926591211028242,26.472516656201325 -3.5380830513658776,36.954700469970703 1.2597870826721191,37.140213012695313 1.3446992635726929,37.000419616699219 1.664225697517395,37.29449462890625 1.7902572154998779,37.43402099609375 1.470055103302002,51.370888500897557 7.4163459734570729,51.20102152843122 7.1738039562841562,42.721500396728516 3.6584999561309814,42.721500396728516 2.2342472076416016,42.399410247802734 1.4956772327423096,43.644271850585938 0.96149998903274536))"
- };
-
-
- // Test the FORWARD case
- test_one(caseid, brandon[0], brandon[1]);
-}
-#endif
-
-
-
-int main(int argc, char** argv)
-{
- int mode = (argc > 1) ? atol(argv[1]) : 1;
- switch(mode)
- {
- case 1 :
- test_traverse_gmp >("float");
- break;
- case 2 :
- test_traverse_gmp >("double");
- break;
- case 3 :
- test_traverse_gmp >("long double");
- break;
- case 4 :
- #if defined(HAVE_TTMATH)
- test_traverse_gmp >("ttmath_big");
- #endif
- break;
- }
- return 0;
-}
diff --git a/test/algorithms/set_operations/difference/difference.cpp b/test/algorithms/set_operations/difference/difference.cpp
index 854e8a044..a56bcce3d 100644
--- a/test/algorithms/set_operations/difference/difference.cpp
+++ b/test/algorithms/set_operations/difference/difference.cpp
@@ -30,11 +30,6 @@
#include
-#ifdef HAVE_TTMATH
-# include
-#endif
-
-
// Convenience macros (points are not checked)
#define TEST_DIFFERENCE(caseid, clips1, area1, clips2, area2, clips3) \
(test_one) \
@@ -428,7 +423,7 @@ void test_all()
test_one("ggl_list_20110627_phillip",
ggl_list_20110627_phillip[0], ggl_list_20110627_phillip[1],
BG_IF_RESCALED(1, 0), -1,
- BG_IF_RESCALED(if_typed_tt(0.0000000000001105367, 0.000125137888971949), 0),
+ BG_IF_RESCALED(0.000125137888971949, 0),
1, -1, 3577.40960816756,
tolerance(0.01)
);
@@ -640,11 +635,6 @@ int test_main(int, char* [])
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
test_all >();
-
-#ifdef HAVE_TTMATH
- std::cout << "Testing TTMATH" << std::endl;
- test_all >();
-#endif
#endif
#if defined(BOOST_GEOMETRY_TEST_FAILURES)
diff --git a/test/algorithms/set_operations/difference/difference_areal_linear.cpp b/test/algorithms/set_operations/difference/difference_areal_linear.cpp
index a44193e6e..80e535130 100644
--- a/test/algorithms/set_operations/difference/difference_areal_linear.cpp
+++ b/test/algorithms/set_operations/difference/difference_areal_linear.cpp
@@ -31,10 +31,6 @@
#include
-#ifdef HAVE_TTMATH
-# include
-#endif
-
template
void test_ticket_10835(std::string const& wkt_out1, std::string const& wkt_out2)
{
diff --git a/test/algorithms/set_operations/difference/difference_multi.cpp b/test/algorithms/set_operations/difference/difference_multi.cpp
index 2e53e920c..a6ffc647d 100644
--- a/test/algorithms/set_operations/difference/difference_multi.cpp
+++ b/test/algorithms/set_operations/difference/difference_multi.cpp
@@ -520,12 +520,6 @@ int test_main(int, char* [])
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
test_all >();
-
-#if defined(HAVE_TTMATH)
- std::cout << "Testing TTMATH" << std::endl;
- test_all >();
-#endif
-
#endif
#if defined(BOOST_GEOMETRY_TEST_FAILURES)
diff --git a/test/algorithms/set_operations/difference/difference_multi_areal_linear.cpp b/test/algorithms/set_operations/difference/difference_multi_areal_linear.cpp
index 2a15e555c..aa2903728 100644
--- a/test/algorithms/set_operations/difference/difference_multi_areal_linear.cpp
+++ b/test/algorithms/set_operations/difference/difference_multi_areal_linear.cpp
@@ -10,7 +10,6 @@
#include
#include
-//#define HAVE_TTMATH
//#define BOOST_GEOMETRY_DEBUG_ASSEMBLE
//#define BOOST_GEOMETRY_CHECK_WITH_SQLSERVER
diff --git a/test/algorithms/set_operations/difference/difference_multi_spike.cpp b/test/algorithms/set_operations/difference/difference_multi_spike.cpp
index 60b27ed00..a6b2fea1b 100644
--- a/test/algorithms/set_operations/difference/difference_multi_spike.cpp
+++ b/test/algorithms/set_operations/difference/difference_multi_spike.cpp
@@ -109,13 +109,6 @@ int test_main(int, char* [])
test_spikes_in_ticket_8364, false, false>();
test_spikes_in_ticket_8365, true, true >();
test_spikes_in_ticket_8365, false, false >();
-
-#ifdef HAVE_TTMATH
- std::cout << "Testing TTMATH" << std::endl;
- test_spikes_in_ticket_8364, true, true>();
- test_spikes_in_ticket_8365, true, true>();
-#endif
-
return 0;
}
diff --git a/test/algorithms/set_operations/intersection/intersection.cpp b/test/algorithms/set_operations/intersection/intersection.cpp
index d232a6101..ec5e985e0 100644
--- a/test/algorithms/set_operations/intersection/intersection.cpp
+++ b/test/algorithms/set_operations/intersection/intersection.cpp
@@ -177,7 +177,7 @@ void test_areal()
1, 4, 163292.679042133, ut_settings(0.1));
{
- ut_settings settings(if_typed_tt(0.01, 0.1));
+ ut_settings settings(0.1);
settings.set_test_validity(BG_IF_RESCALED(true, false));
// SQL Server gives: 88.1920416352664
@@ -234,7 +234,7 @@ void test_areal()
test_one("ggl_list_20110627_phillip",
ggl_list_20110627_phillip[0], ggl_list_20110627_phillip[1],
- 1, if_typed_tt(6, 5), 11151.6618);
+ 1, 5, 11151.6618);
test_one("ggl_list_20110716_enrico",
ggl_list_20110716_enrico[0], ggl_list_20110716_enrico[1],
@@ -935,12 +935,6 @@ int test_main(int, char* [])
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
test_all >();
-#if defined(HAVE_TTMATH)
- std::cout << "Testing TTMATH" << std::endl;
- test_all >();
-#endif
-
-
// Commented, because exception is now disabled:
// test_exception >();
diff --git a/test/algorithms/set_operations/intersection/intersection_multi.cpp b/test/algorithms/set_operations/intersection/intersection_multi.cpp
index a661db774..4cacabd5c 100644
--- a/test/algorithms/set_operations/intersection/intersection_multi.cpp
+++ b/test/algorithms/set_operations/intersection/intersection_multi.cpp
@@ -503,12 +503,6 @@ int test_main(int, char* [])
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
test_all >();
-
-#if defined(HAVE_TTMATH)
- std::cout << "Testing TTMATH" << std::endl;
- test_all >();
-#endif
-
#endif
#if defined(BOOST_GEOMETRY_TEST_FAILURES)
diff --git a/test/algorithms/set_operations/union/union.cpp b/test/algorithms/set_operations/union/union.cpp
index edf799d80..cdec14a9b 100644
--- a/test/algorithms/set_operations/union/union.cpp
+++ b/test/algorithms/set_operations/union/union.cpp
@@ -64,7 +64,7 @@ void test_areal()
// This sample was selected because of the border case, and ttmath generates one point more.
test_one("star_poly", example_star, example_polygon,
1, 1,
- if_typed_tt(28, 27), 5.647949);
+ 27, 5.647949);
// Pseudo-box as Polygon
// (note, internally, the intersection points is different, so yes,
@@ -160,7 +160,7 @@ void test_areal()
test_one("distance_zero",
distance_zero[0], distance_zero[1],
- 1, 0, 8, 9.0098387);
+ 1, 0, -1, 9.0098387);
test_one("wrapped_a",
wrapped[0], wrapped[1],
@@ -370,7 +370,7 @@ void test_areal()
ggl_list_20110820_christophe[0], ggl_list_20110820_christophe[1],
-1, // Either 1 or 2, depending if the intersection/turn point (eps.region) is missed
0,
- if_typed_tt(9, 8),
+ 8,
67.3550722317627);
#endif
@@ -508,14 +508,14 @@ void test_areal()
1, 0, -1, 19.3995);
test_one("buffer_rt_m1", buffer_rt_m1[0], buffer_rt_m1[1],
- 1, 0, 9, 19.4852);
+ 1, 0, -1, 19.4852);
test_one("buffer_rt_m1_rev", buffer_rt_m1[1], buffer_rt_m1[0],
- 1, 0, 9, 19.4852);
+ 1, 0, -1, 19.4852);
test_one("buffer_rt_m2", buffer_rt_m2[0], buffer_rt_m2[1],
1, 0, -1, 21.4853);
test_one("buffer_rt_m2_rev", buffer_rt_m2[1], buffer_rt_m2[0],
- 1, 0, 15, 21.4853);
+ 1, 0, -1, 21.4853);
test_one("buffer_rt_q", buffer_rt_q[0], buffer_rt_q[1],
1, 0, -1, 18.5710);
@@ -531,7 +531,7 @@ void test_areal()
1, 0, -1, 15.6569);
test_one("buffer_mp1", buffer_mp1[0], buffer_mp1[1],
- 1, 0, if_typed_tt(93, 91), 22.815);
+ 1, 0, 91, 22.815);
test_one("buffer_mp2", buffer_mp2[0], buffer_mp2[1],
1, -1, 217, 36.752837);
@@ -618,17 +618,12 @@ void test_all()
int test_main(int, char* [])
{
BoostGeometryWriteTestConfiguration();
- test_all >();
+ test_all>();
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
-
- test_all >();
- test_all >();
-
-#if defined(HAVE_TTMATH)
- std::cout << "Testing TTMATH" << std::endl;
- test_all >();
-#endif
+ test_all>();
+ test_all>();
+ test_all>();
#endif
#if defined(BOOST_GEOMETRY_TEST_FAILURES)
diff --git a/test/algorithms/set_operations/union/union_multi.cpp b/test/algorithms/set_operations/union/union_multi.cpp
index 0cf81ee39..0051f6b05 100644
--- a/test/algorithms/set_operations/union/union_multi.cpp
+++ b/test/algorithms/set_operations/union/union_multi.cpp
@@ -43,6 +43,8 @@
template
void test_areal()
{
+ using ct = typename bg::coordinate_type::type;
+
test_one("simplex_multi",
case_multi_simplex[0], case_multi_simplex[1],
1, 0, 20, 14.58);
@@ -364,7 +366,7 @@ void test_areal()
TEST_UNION(case_recursive_boxes_79, 1, 2, -1, 14.75);
// No hole should be generated (but rescaling generates one hole)
- TEST_UNION(case_recursive_boxes_80, 2, BG_IF_RESCALED(1, 0), -1, 1.5);
+ TEST_UNION(case_recursive_boxes_80, 2, BG_IF_RESCALED(bg_if_mp(0, 1), 0), -1, 1.5);
TEST_UNION(case_recursive_boxes_81, 5, 0, -1, 15.5);
TEST_UNION(case_recursive_boxes_82, 2, 2, -1, 20.25);
@@ -384,7 +386,7 @@ void test_areal()
test_one("ggl_list_20140212_sybren",
ggl_list_20140212_sybren[0], ggl_list_20140212_sybren[1],
- 2, 0, 16, 0.002471626);
+ 2, bg_if_mp(1, 0), -1, 0.002471626);
{
// Generates either 4 or 3 output polygons
@@ -393,7 +395,7 @@ void test_areal()
settings.set_test_validity(BG_IF_RESCALED(false, true));
test_one("ticket_9081",
ticket_9081[0], ticket_9081[1],
- BG_IF_RESCALED(4, 3), 0, 31, 0.2187385,
+ BG_IF_RESCALED(bg_if_mp(3, 4), 3), 0, -1, 0.2187385,
settings);
}
@@ -480,16 +482,10 @@ int test_main(int, char* [])
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
test_all, false, false>();
+ test_all, true, true>();
+ test_all, true, true>();
test_specific, false, false>();
-
- test_all, true, true>();
-
-#if defined(HAVE_TTMATH)
- std::cout << "Testing TTMATH" << std::endl;
- test_all >();
-#endif
-
#endif
#if defined(BOOST_GEOMETRY_TEST_FAILURES)
diff --git a/test/geometry_test_common.hpp b/test/geometry_test_common.hpp
index deef3b90f..5f88e9635 100644
--- a/test/geometry_test_common.hpp
+++ b/test/geometry_test_common.hpp
@@ -80,22 +80,8 @@
#endif
-
-#if defined(HAVE_TTMATH)
-# include
-#endif
-
-#if defined(HAVE_CLN) || defined(HAVE_GMP)
-# include
-#endif
-
-
-#if defined(HAVE_GMP)
-# include
-#endif
-#if defined(HAVE_CLN)
-# include
-#endif
+// For testing high precision numbers
+#include
// For all tests:
// - do NOT use "using namespace boost::geometry" to make clear what is Boost.Geometry
@@ -108,17 +94,6 @@
namespace bg = boost::geometry;
-template
-inline T1 if_typed_tt(T1 value_tt, T2 value)
-{
-#if defined(HAVE_TTMATH)
- return boost::is_same::type::value ? value_tt : value;
-#else
- boost::ignore_unused(value_tt);
- return value;
-#endif
-}
-
template
inline T if_typed(T value_typed, T value)
{
@@ -188,8 +163,16 @@ private :
};
+typedef boost::multiprecision::cpp_bin_float_100 mp_test_type;
typedef double default_test_type;
+template
+inline T1 const& bg_if_mp(T1 const& value_mp, T2 const& value)
+{
+ return boost::is_same::type::value ? value_mp : value;
+}
+
+
#if defined(BOOST_GEOMETRY_USE_RESCALING)
#define BG_IF_RESCALED(a, b) a
#else
diff --git a/test/robustness/overlay/buffer/recursive_polygons_buffer.cpp b/test/robustness/overlay/buffer/recursive_polygons_buffer.cpp
index 420afb2a9..391dfe2ec 100644
--- a/test/robustness/overlay/buffer/recursive_polygons_buffer.cpp
+++ b/test/robustness/overlay/buffer/recursive_polygons_buffer.cpp
@@ -353,10 +353,6 @@ int main(int argc, char** argv)
{
test_all(seed, count, level, settings);
}
-
-#if defined(HAVE_TTMATH)
- // test_all(seed, count, max, svg, level);
-#endif
}
catch(std::exception const& e)
{
diff --git a/test/string_from_type.hpp b/test/string_from_type.hpp
index 4c3da5f8d..8d2bd6db8 100644
--- a/test/string_from_type.hpp
+++ b/test/string_from_type.hpp
@@ -23,24 +23,6 @@
#include
-#if defined(HAVE_TTMATH)
-# include
-#endif
-
-#if defined(HAVE_CLN) || defined(HAVE_GMP)
-# include
-#endif
-
-
-#if defined(HAVE_GMP)
-# include
-#endif
-#if defined(HAVE_CLN)
-# include
-#endif
-
-
-
template
struct string_from_type {};
@@ -80,26 +62,9 @@ template <> struct string_from_type
{ static std::string name() { return "n"; } };
#endif
-#if defined(HAVE_TTMATH)
- template <> struct string_from_type
- { static std::string name() { return "t"; } };
-#endif
-
#if defined(BOOST_RATIONAL_HPP)
template struct string_from_type >
{ static std::string name() { return "r"; } };
#endif
-
-#if defined(HAVE_GMP)
-template <> struct string_from_type
-{ static std::string name() { return "g"; } };
-#endif
-
-#if defined(HAVE_CLN)
-template <> struct string_from_type
-{ static std::string name() { return "c"; } };
-#endif
-
-
#endif // GEOMETRY_TEST_STRING_FROM_TYPE_HPP