[geos-commits] r3399 - branches/3.3/tests/unit/capi

svn_geos at osgeo.org svn_geos at osgeo.org
Fri Jul 1 05:02:54 EDT 2011


Author: strk
Date: 2011-07-01 02:02:54 -0700 (Fri, 01 Jul 2011)
New Revision: 3399

Modified:
   branches/3.3/tests/unit/capi/GEOSBufferTest.cpp
Log:
Add test for bug #455 to 3.3 branch (passes)


Modified: branches/3.3/tests/unit/capi/GEOSBufferTest.cpp
===================================================================
--- branches/3.3/tests/unit/capi/GEOSBufferTest.cpp	2011-07-01 08:22:32 UTC (rev 3398)
+++ branches/3.3/tests/unit/capi/GEOSBufferTest.cpp	2011-07-01 09:02:54 UTC (rev 3399)
@@ -526,5 +526,27 @@
 ));
     }
 
+    // Single-sided buffer  (3)
+    // http://trac.osgeo.org/geos/ticket/455
+    template<>
+    template<>
+    void object::test<20>()
+    {
+        geom1_ = GEOSGeomFromWKT("LINESTRING(0 0, 10 0, 10 10)', -10)");
+
+        ensure( 0 != geom1_ );
+
+        geom2_ = GEOSSingleSidedBuffer(geom1_, 10, 8, GEOSBUF_JOIN_BEVEL, 0, 0);
+
+        ensure( 0 != geom2_ );
+
+        wkt_ = GEOSGeomToWKT(geom2_);
+
+        ensure_equals(std::string(wkt_), std::string(
+"LINESTRING (20.0000000000000000 10.0000000000000000, 20.0000000000000000 0.0000000000000000, 10.0000000000000000 -10.0000000000000000, 0.0000000000000000 -10.0000000000000000)"
+        ));
+
+    }
+
 } // namespace tut
 



More information about the geos-commits mailing list