[geos-commits] r3602 - trunk/tests/unit/capi
svn_geos at osgeo.org
svn_geos at osgeo.org
Thu Apr 5 13:07:37 EDT 2012
Author: strk
Date: 2012-04-05 10:07:37 -0700 (Thu, 05 Apr 2012)
New Revision: 3602
Modified:
trunk/tests/unit/capi/GEOSNodeTest.cpp
Log:
Normalize noded geometry before comparing with expected value
In this way we can change the noding implementation w/out
breaking the tests.
Modified: trunk/tests/unit/capi/GEOSNodeTest.cpp
===================================================================
--- trunk/tests/unit/capi/GEOSNodeTest.cpp 2012-04-05 16:56:49 UTC (rev 3601)
+++ trunk/tests/unit/capi/GEOSNodeTest.cpp 2012-04-05 17:07:37 UTC (rev 3602)
@@ -73,12 +73,13 @@
geom2_ = GEOSNode(geom1_);
ensure(geom2_);
+ GEOSNormalize(geom2_);
char* wkt_c = GEOSWKTWriter_write(w_, geom2_);
std::string out(wkt_c);
free(wkt_c);
ensure_equals(out,
- "MULTILINESTRING ((0 0, 5 5), (5 5, 10 10, 10 0, 5 5), (5 5, 0 10))"
+ "MULTILINESTRING ((5 5, 10 0, 10 10, 5 5), (0 10, 5 5), (0 0, 5 5))"
);
}
@@ -91,12 +92,13 @@
geom2_ = GEOSNode(geom1_);
ensure(geom2_);
+ GEOSNormalize(geom2_);
char* wkt_c = GEOSWKTWriter_write(w_, geom2_);
std::string out(wkt_c);
free(wkt_c);
ensure_equals(out,
- "MULTILINESTRING ((0 0, 1 0), (1 0, 2 0), (2 0, 3 0), (3 0, 4 0), (5 0, 4 0))"
+ "MULTILINESTRING ((4 0, 5 0), (3 0, 4 0), (2 0, 3 0), (1 0, 2 0), (0 0, 1 0))"
);
}
@@ -109,12 +111,13 @@
geom2_ = GEOSNode(geom1_);
ensure(geom2_);
+ GEOSNormalize(geom2_);
char* wkt_c = GEOSWKTWriter_write(w_, geom2_);
std::string out(wkt_c);
free(wkt_c);
ensure_equals(out,
- "MULTILINESTRING ((0 0, 2 0), (2 0, 4 0))"
+ "MULTILINESTRING ((2 0, 4 0), (0 0, 2 0))"
);
}
More information about the geos-commits
mailing list