[geos-commits] r2485 - trunk/tests/unit/capi
svn_geos at osgeo.org
svn_geos at osgeo.org
Thu May 7 04:45:49 EDT 2009
Author: strk
Date: 2009-05-07 04:45:47 -0400 (Thu, 07 May 2009)
New Revision: 2485
Modified:
trunk/tests/unit/capi/GEOSCoordSeqTest.cpp
Log:
Add test for creating a CoordinateSequence with at least 2 dimension
Modified: trunk/tests/unit/capi/GEOSCoordSeqTest.cpp
===================================================================
--- trunk/tests/unit/capi/GEOSCoordSeqTest.cpp 2009-05-06 20:47:39 UTC (rev 2484)
+++ trunk/tests/unit/capi/GEOSCoordSeqTest.cpp 2009-05-07 08:45:47 UTC (rev 2485)
@@ -234,6 +234,29 @@
ensure_equals( ycheck, y );
ensure_equals( zcheck, z );
}
+
+ // Test getDimensions call (see bug #135)
+ template<>
+ template<>
+ void object::test<6>()
+ {
+ cs_ = GEOSCoordSeq_create(1, 2);
+
+ unsigned int size;
+ unsigned int dims;
+
+ ensure ( 0 != GEOSCoordSeq_getSize(cs_, &size) );
+ ensure_equals( size, 1u );
+
+ ensure ( 0 != GEOSCoordSeq_getDimensions(cs_, &dims) );
+
+ // The dimension passed to GEOSCoordSeq_create()
+ // is a request for a minimum, not a strict mandate
+ // for changing actual size.
+ //
+ ensure ( dims >= 2u );
+
+ }
} // namespace tut
More information about the geos-commits
mailing list