|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r81967 - in trunk/libs/geometry/test: . algorithms algorithms/overlay
From: barend.gehrels_at_[hidden]
Date: 2012-12-15 07:31:07
Author: barendgehrels
Date: 2012-12-15 07:31:06 EST (Sat, 15 Dec 2012)
New Revision: 81967
URL: http://svn.boost.org/trac/boost/changeset/81967
Log:
[geometry] pending commit, unit test for problems with integer coordinates reported by Volker (again) at 2012/07/17 and fixed in r79505
Text files modified:
trunk/libs/geometry/test/algorithms/difference.cpp | 22 ++++++++++++++++++++--
trunk/libs/geometry/test/algorithms/overlay/overlay_cases.hpp | 7 +++++++
trunk/libs/geometry/test/geometry_test_common.hpp | 3 +++
3 files changed, 30 insertions(+), 2 deletions(-)
Modified: trunk/libs/geometry/test/algorithms/difference.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/difference.cpp (original)
+++ trunk/libs/geometry/test/algorithms/difference.cpp 2012-12-15 07:31:06 EST (Sat, 15 Dec 2012)
@@ -298,8 +298,11 @@
1, 0, 2.8570121719168924,
1, 0, 64.498061986388564);
-
-
+ test_one<polygon, polygon, polygon>("ggl_list_20120717_volker",
+ ggl_list_20120717_volker[0], ggl_list_20120717_volker[1],
+ 1, 11, 3370866.2295081965,
+ 1, 5, 384.2295081964694, 0.01);
+
#ifdef _MSC_VER
// 2011-07-02
// Interesting FP-precision case.
@@ -464,6 +467,19 @@
}
*****/
+
+template <typename P, bool clockwise, bool closed>
+void test_specific()
+{
+ typedef bg::model::polygon<P, clockwise, closed> polygon;
+
+ test_one<polygon, polygon, polygon>("ggl_list_20120717_volker",
+ ggl_list_20120717_volker[0], ggl_list_20120717_volker[1],
+ 1, 11, 3370866.2295081965,
+ 1, 5, 384, 0.01);
+}
+
+
int test_main(int, char* [])
{
//test_difference_parcel_precision<float>();
@@ -471,6 +487,8 @@
test_all<bg::model::d2::point_xy<double> >();
+ test_specific<bg::model::d2::point_xy<int>, false, false>();
+
#if ! defined(BOOST_GEOMETRY_TEST_ONLY_ONE_TYPE)
test_all<bg::model::d2::point_xy<float> >();
Modified: trunk/libs/geometry/test/algorithms/overlay/overlay_cases.hpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/overlay/overlay_cases.hpp (original)
+++ trunk/libs/geometry/test/algorithms/overlay/overlay_cases.hpp 2012-12-15 07:31:06 EST (Sat, 15 Dec 2012)
@@ -567,6 +567,13 @@
"POLYGON((1716 1554,2076 2250,2436 2352,2796 1248,3156 2484,3516 2688,3156 2483,2796 1247,2436 2351,2076 2249, 1716 1554))",
};
+static std::string ggl_list_20120717_volker[2] =
+ {
+ "POLYGON((1031 1056,3232 1056,3232 2856,1031 2856))",
+ "POLYGON((1032 1458,1032 1212,2136 2328,3234 2220,3234 2412,2136 2646))"
+ };
+
+
static std::string buffer_rt_a[2] =
{
"POLYGON((1 7,1 8,1.0012 8.04907,1.00482 8.09802,1.01082 8.14673,1.01921 8.19509,1.02997 8.24298,1.04306 8.29028,1.05846 8.33689,1.07612 8.38268,1.09601 8.42756,1.11808 8.4714,1.14227 8.5141,1.16853 8.55557,1.19679 8.5957,1.22699 8.63439,1.25905 8.67156,1.29289 8.70711,1.32844 8.74095,1.36561 8.77301,1.4043 8.80321,1.44443 8.83147,1.4859 8.85773,1.5286 8.88192,1.57244 8.90399,1.61732 8.92388,1.66311 8.94154,1.70972 8.95694,1.75702 8.97003,1.80491 8.98079,1.85327 8.98918,1.90198 8.99518,1.95093 8.9988,2 9,3 9,3.04907 8.9988,3.09802 8.99518,3.14673 8.98918,3.19509 8.98079,3.24298 8.97003,3.29028 8.95694,3.33689 8.94154,3.38268 8.92388,3.42756 8.90399,3.4714 8.88192,3.5141 8.85773,3.55557 8.83147,3.5957 8.80321,3.63439 8.77301,3.67156 8.74095,3.70711 8.70711,3.74095 8.67156,3.77301 8.63439,3.80321 8.5957,3.83147 8.55557,3.85773 8.5141,3.88192 8.4714,3.90399 8.42756,3.92388 8.38268,3.94154 8.33689,3.95694 8.29028,3.97003 8.24298,3.98079 8.19509,3.98918 8.14673,3.99518 8.09802,3.9988 8.04907,4 8,4 7,3.9988 6
.95093,3.99518 6.90198,3.98918 6.85327,3.98079 6.80491,3.97003 6.75702,3.95694 6.70972,3.94154 6.66311,3.92388 6.61732,3.90399 6.57244,3.88192 6.5286,3.85773 6.4859,3.83147 6.44443,3.80321 6.4043,3.77301 6.36561,3.74095 6.32844,3.70711 6.29289,3.67156 6.25905,3.63439 6.22699,3.5957 6.19679,3.55557 6.16853,3.5141 6.14227,3.4714 6.11808,3.42756 6.09601,3.38268 6.07612,3.33689 6.05846,3.29028 6.04306,3.24298 6.02997,3.19509 6.01921,3.14673 6.01082,3.09802 6.00482,3.04907 6.0012,3 6,2 6,1.95093 6.0012,1.90198 6.00482,1.85327 6.01082,1.80491 6.01921,1.75702 6.02997,1.70972 6.04306,1.66311 6.05846,1.61732 6.07612,1.57244 6.09601,1.5286 6.11808,1.4859 6.14227,1.44443 6.16853,1.4043 6.19679,1.36561 6.22699,1.32844 6.25905,1.29289 6.29289,1.25905 6.32844,1.22699 6.36561,1.19679 6.4043,1.16853 6.44443,1.14227 6.4859,1.11808 6.5286,1.09601 6.57244,1.07612 6.61732,1.05846 6.66311,1.04306 6.70972,1.02997 6.75702,1.01921 6.80491,1.01082 6.85327,1.00482 6.90198,1.0012 6.95093,1 7))",
Modified: trunk/libs/geometry/test/geometry_test_common.hpp
==============================================================================
--- trunk/libs/geometry/test/geometry_test_common.hpp (original)
+++ trunk/libs/geometry/test/geometry_test_common.hpp 2012-12-15 07:31:06 EST (Sat, 15 Dec 2012)
@@ -89,6 +89,9 @@
template <> struct string_from_type<long double>
{ static std::string name() { return "e"; } };
+template <> struct string_from_type<int>
+{ static std::string name() { return "i"; } };
+
#if defined(HAVE_TTMATH)
template <> struct string_from_type<ttmath_big>
{ static std::string name() { return "t"; } };
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