[geos-commits] r3150 - trunk/tests/unit/capi
svn_geos at osgeo.org
svn_geos at osgeo.org
Thu Dec 2 13:06:38 EST 2010
Author: strk
Date: 2010-12-02 10:06:38 -0800 (Thu, 02 Dec 2010)
New Revision: 3150
Modified:
trunk/tests/unit/capi/GEOSSnapTest.cpp
Log:
Another test, and a leak plug (in the test)
Modified: trunk/tests/unit/capi/GEOSSnapTest.cpp
===================================================================
--- trunk/tests/unit/capi/GEOSSnapTest.cpp 2010-12-02 16:49:26 UTC (rev 3149)
+++ trunk/tests/unit/capi/GEOSSnapTest.cpp 2010-12-02 18:06:38 UTC (rev 3150)
@@ -50,6 +50,7 @@
GEOSGeom_destroy(geom1_);
GEOSGeom_destroy(geom2_);
GEOSGeom_destroy(geom3_);
+ GEOSWKTWriter_destroy(w_);
geom1_ = 0;
geom2_ = 0;
geom3_ = 0;
@@ -116,6 +117,22 @@
"LINESTRING (-20 -20, -10 -9, 50 50, 80 79, 100 100)"
);
}
-
+
+ /// Another single segment
+ template<>
+ template<>
+ void object::test<4>()
+ {
+ geom1_ = GEOSGeomFromWKT("LINESTRING(0 0, 10 0)");
+ geom2_ = GEOSGeomFromWKT("LINESTRING(0 0, 9 0)");
+ geom3_ = GEOSSnap(geom1_, geom2_, 2);
+
+ char* wkt_c = GEOSWKTWriter_write(w_, geom3_);
+ std::string out(wkt_c);
+ free(wkt_c);
+
+ ensure_equals(out, "LINESTRING (0 0, 9 0)");
+ }
+
} // namespace tut
More information about the geos-commits
mailing list