[geos-commits] r2375 - trunk/tests/unit/algorithm
svn_geos at osgeo.org
svn_geos at osgeo.org
Thu Apr 16 08:08:26 EDT 2009
Author: strk
Date: 2009-04-16 08:08:26 -0400 (Thu, 16 Apr 2009)
New Revision: 2375
Modified:
trunk/tests/unit/algorithm/RobustLineIntersectionTest.cpp
Log:
better isolation of test-specific functions
Modified: trunk/tests/unit/algorithm/RobustLineIntersectionTest.cpp
===================================================================
--- trunk/tests/unit/algorithm/RobustLineIntersectionTest.cpp 2009-04-16 10:48:14 UTC (rev 2374)
+++ trunk/tests/unit/algorithm/RobustLineIntersectionTest.cpp 2009-04-16 12:08:26 UTC (rev 2375)
@@ -30,24 +30,9 @@
// Test Group
//
- struct test_lineintersector_data {};
-
- typedef test_group<test_lineintersector_data> group;
- typedef group::object object;
-
- group test_lineintersector_group(
- "geos::algorithm::RobustLineIntersection");
-
- // These are static to avoid namespace pollution
- // The struct test_*_data above is probably there
- // for the same reason...
- //
- static PrecisionModel pm;
- static GeometryFactory gf(&pm);
- static geos::io::WKTReader reader(&gf);
-
+ struct test_robustlineintersection_data
+ {
typedef std::auto_ptr<Geometry> GeomPtr;
- typedef std::auto_ptr<Geometry> GeomPtr;
bool equals(const Coordinate& p0, const Coordinate& p1,
double distanceTolerance)
@@ -191,9 +176,27 @@
intPt, distanceTolerance);
}
+ test_robustlineintersection_data()
+ :
+ pm(),
+ gf(&pm),
+ reader(&gf)
+ {
+ }
+ PrecisionModel pm;
+ GeometryFactory gf;
+ geos::io::WKTReader reader;
+ };
+ typedef test_group<test_robustlineintersection_data> group;
+ typedef group::object object;
+
+ group test_robustlineintersection_group(
+ "geos::algorithm::RobustLineIntersection");
+
+
//
// Test Cases
//
More information about the geos-commits
mailing list