[geos-commits] r4125 - trunk/tests/unit/capi

svn_geos at osgeo.org svn_geos at osgeo.org
Mon Nov 30 12:30:21 PST 2015


Author: strk
Date: 2015-11-30 12:30:21 -0800 (Mon, 30 Nov 2015)
New Revision: 4125

Modified:
   trunk/tests/unit/capi/GEOSMinimumWidthTest.cpp
Log:
Add another test for GEOSMinimumWidth

Modified: trunk/tests/unit/capi/GEOSMinimumWidthTest.cpp
===================================================================
--- trunk/tests/unit/capi/GEOSMinimumWidthTest.cpp	2015-11-30 20:30:15 UTC (rev 4124)
+++ trunk/tests/unit/capi/GEOSMinimumWidthTest.cpp	2015-11-30 20:30:21 UTC (rev 4125)
@@ -80,4 +80,20 @@
         GEOSGeom_destroy(output);
     }
 
+    template<>
+    template<>
+    void object::test<2>()
+    {
+        input_ = GEOSGeomFromWKT("LINESTRING (0 0,0 10, 10 10)");
+        ensure( 0 != input_ );
+
+        GEOSGeometry* output = GEOSMinimumWidth(input_);
+        ensure( 0 != output );
+        ensure( 0 == GEOSisEmpty(output) );
+
+        wkt_ = GEOSWKTWriter_write(wktw_, output);
+        ensure_equals(std::string(wkt_), std::string( "LINESTRING (5 5, 0 10)"));
+        GEOSGeom_destroy(output);
+    }
+
 } // namespace tut



More information about the geos-commits mailing list