[Qgis-psc] QGIS Grant: Expand unit test coverage for geometry classes

Nyall Dawson nyall.dawson at gmail.com
Mon Sep 25 19:31:34 PDT 2017


Hi PSC,

Just reporting in that with PR #5254 [1], the grant work has now been
completed and we're sitting as close as possible to 100% unit test
coverage for the geometry primitive classes (i.e. the classes which
represent the raw geometry types, such as points/multipoints/circular
strings/ etc).

While the purpose of this work wasn't directly to fix bugs, writing
the tests has allowed me to identify and fix dozens of issues in these
geometry classes. The fixes range from pedantic (e.g. crashes when
requesting parts of the geometry with invalid indexes such as negative
numbers), through to severe (a geometry corruption caused after
converting a MultiLineString to GML which would definitely cause QGIS
server to crash on certain requests).

Just to ensure that there's no misconceptions here: having 100% test
coverage doesn't mean the geometry classes are now bug free - rather
it means that the current logic is protected so that future features,
fixes, or optimisations will not cause regressions from the current
behaviour.

I'd like the thank the PSC once again for accepting this funding
request (and the sponsors who made it possible!). In my opinion this
was a crucial piece of work required to help make future QGIS releases
much less likely to suffer serious regressions, so I'm very thankful
that you allowed it to happen!

Regards,
Nyall


[1] https://github.com/qgis/QGIS/pull/5254



More information about the Qgis-psc mailing list