|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r76900 - trunk/libs/geometry/test/multi/algorithms
From: barend.gehrels_at_[hidden]
Date: 2012-02-05 11:20:38
Author: barendgehrels
Date: 2012-02-05 11:20:37 EST (Sun, 05 Feb 2012)
New Revision: 76900
URL: http://svn.boost.org/trac/boost/changeset/76900
Log:
Added several tests for ticket #6019, fixed now, and some other configurations
Text files modified:
trunk/libs/geometry/test/multi/algorithms/multi_convex_hull.cpp | 21 ++++++++++++++++++++-
1 files changed, 20 insertions(+), 1 deletions(-)
Modified: trunk/libs/geometry/test/multi/algorithms/multi_convex_hull.cpp
==============================================================================
--- trunk/libs/geometry/test/multi/algorithms/multi_convex_hull.cpp (original)
+++ trunk/libs/geometry/test/multi/algorithms/multi_convex_hull.cpp 2012-02-05 11:20:37 EST (Sun, 05 Feb 2012)
@@ -47,9 +47,28 @@
typedef bg::model::multi_point<P> mp;
typedef bg::model::multi_linestring<bg::model::linestring<P> > ml;
typedef bg::model::multi_polygon<bg::model::polygon<P> > mpoly;
- test_geometry<mp>("multipoint((1.1 1.1), (2.5 2.1), (3.1 3.1), (4.9 1.1), (3.1 1.9))", 5, 4, 3.8);
+
+ // All points below in upper-points and lower-points
+ test_geometry<mp>("MULTIPOINT((0 0),(5 0),(1 1),(4 1))", -1, 5, 4.0);
+ test_geometry<mp>("MULTIPOINT((0 1),(5 1),(1 0),(4 0))", -1, 5, 4.0);
+
+ // All points in vertical line (this delivers an empty polygon with 2 points and a closing point)
+ test_geometry<mp>("MULTIPOINT((1 0),(5 0),(3 0),(4 0),(2 0))", -1, 3, 0.0);
+
+ // One point only
+ test_geometry<mp>("MULTIPOINT((1 0))", -1, 3, 0.0);
+
+ // Problem of 6019, reproduced by the convex hull robustness test:
+ test_geometry<mp>("MULTIPOINT((2 9),(1 3),(9 4),(1 1),(1 0),(7 9),(2 5),(3 7),(3 6),(2 4))",
+ -1, 6, 48.0);
+
+ // Ticket 6019:
+ test_geometry<mp>("MULTIPOINT((0 53),(0 103),(0 53),(0 3),(0 3),(0 0),(1 0),(1 1),(2 1),(2 0),(2 0),(2 0),(3 0),(3 1),(4 1),(4 0),(5 0),(0 3),(10 3),(10 2),(10 2),(10 2),(5 2),(5 0),(5 0),(55 0),(105 0))",
+ -1, 4, 5407.5);
// Ticket 6021:
test_geometry<mp>("multipoint((0 53), (0 103), (1 53))", 3, 4, 25);
+
+ test_geometry<mp>("multipoint((1.1 1.1), (2.5 2.1), (3.1 3.1), (4.9 1.1), (3.1 1.9))", 5, 4, 3.8);
test_geometry<ml>("multilinestring((2 4, 3 4, 3 5), (4 3,4 4,5 4))", 6, 5, 3.0);
test_geometry<mpoly>("multipolygon(((1 4,1 6,2 5,3 5,4 6,4 4,1 4)), ((4 2,4 3,6 3,6 2,4 2)))", 12, 7, 14.0);
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