| Version 3 (modified by mloskot, 4 years ago) |
|---|
Unit Tests
Unit tests of Generic Geometry Library are implemented with use of tools from Boost Test library.
The main goals of preparing unit tests are:
- Testing core elements. Note, it is a bit weird now, more core-tests might be added in future.
- Testing algorithms is the main purpose.
- Testing geometries, especially useful to test the concepts (i.e. segment) or specific methods (i.e.latlong). Actually, they might adapted or merged with the custom
tests (custom_linestring).
Preparing Unit Tests
These are only basic guidelines and notes about tests structure:
- 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.)
The above works for generic algorithms working the same for all geometries (such as append).
Other tests will need more specific test cases, 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)
