[geos-commits] r3398 - trunk/tests/unit/capi
svn_geos at osgeo.org
svn_geos at osgeo.org
Fri Jul 1 04:22:32 EDT 2011
Author: strk
Date: 2011-07-01 01:22:32 -0700 (Fri, 01 Jul 2011)
New Revision: 3398
Modified:
trunk/tests/unit/capi/GEOSBufferTest.cpp
Log:
Add test for ticket #455 (bad result from the deprecated GEOSSingleSidedBuffer). It passes here in trunk, good!
Modified: trunk/tests/unit/capi/GEOSBufferTest.cpp
===================================================================
--- trunk/tests/unit/capi/GEOSBufferTest.cpp 2011-07-01 08:22:25 UTC (rev 3397)
+++ trunk/tests/unit/capi/GEOSBufferTest.cpp 2011-07-01 08:22:32 UTC (rev 3398)
@@ -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