Boost logo

Geometry :

Subject: [ggl] Updating tests
From: Barend Gehrels (Barend.Gehrels)
Date: 2009-04-17 14:29:37

(sent earlier but meant for the list)

Mateusz Loskot wrote:
> Are the tests structured in any way or how new tests are added is a
> matter of individual programmer choice?
It also depends on the problem at hand (2D/3D, integer/double,
strategies). We didn't create real guidelines for this but here is a
small list
- test_main is provided by Boost
- in test main: call test_all to test for all geometries, using
different point types
- in test_all: call test_geometry for different geometries (linestring,
polygon, box etc)
This works for generic algorithms working the same for all geometries
(such as append). Other tests will need more specific testcases, so then:
- in test_all: call test_point, test_linestring, test_polygon etc (line
in area.cpp, but the _area may be dropped, it is a bit redunant)
There are also specific cases for different strategies (like in area.cpp).

> As I see, test files are named after algorithms (intersection) or types
> (point_ll or segment) or (probably) namespace or directories
> (i.e. core, wkt). Is there any rationale behind this structure?
Testing algorithms is the main purpose. wkt is also a sort of algorithm
but moved to io/wkt to get more structure, we'll also get io/wkb and
maybe more (kml,...)
Testing geometries is especially useful to test the concepts (segment)
or specific methods (latlong), actually they might adapted or merged
with the custom tests (custom_linestring)
Core is a bit weird now, indeed, actually more core-tests might be added

> Do you mean that all types and algorithms under geometry/strategies
> need to be covered with tests?
Actually yes, if applicable
>> This case should be added. There are more differences in the
>> "comparisons" of US counties, they have to be checked, I think GEOS
>> is wrong there and Terralib is also wrong.
> That's interesting. I will see what I can find about that.
It is interesting indeed. It was on my list but if you've time to figure
it out, would be useful. I'll send you more about this tonight. If geos
is wrong indeed, we can make a ticket and we should contact terralib. If
we are wrong (and then also cgal is) we have to do some more work :-)

Regards, Barend

-------------- next part --------------
An HTML attachment was scrubbed...

Geometry list run by mateusz at