[postgis-devel] Tests for *_force_dims
pramsey at cleverelephant.ca
Mon Dec 30 09:16:15 PST 2019
> On Dec 28, 2019, at 2:38 PM, Kristian Thy <thy at 42.dk> wrote:
> Dear List,
> I was looking for a little hobby project for the holidays and found
> <https://trac.osgeo.org/postgis/ticket/3057> which tickled my fancy.
> This is my first time contributing to PostGIS, and I have a question
> regarding tests for the change I'm about to implement.
> My plan - in order to preserve backwards compatibility - is to change
> the *_force_dims functions defined in liblwgeom_internal.h to call
> through to a new set of functions that accepts M and/or Z values, e.g.
> `lwpoint_force_dims(const LWPOINT *lwpoint, int hasz, int hasm)` returns
> `lwpoint_force_dims_with_defaults(lwpoint, hasz, hasm, 0, 0)`.
> From what I've found on the developer wiki I'm expected to add CUnit
> tests for changes to liblwgeom. However, I can't find any current tests
> for these six functions (liblwgeom_internal.h lines 175 through 180) in
> Would it be sufficient if I added regression tests for the current and
> new, overloaded methods in postgis/regress/core/lwgeom_regress.sql? I.e.
> what you can see in my fork at
Yes, this is OK. A handful of Cunit tests would be nice, since it’s a liblwgeom change, but not mandatory.
> (Bonus question: can CUnit provide coverage reports?)
No idea, but coverage is a state of grace and we are all fallen creatures.
> Any pointers or comments appreciated!
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
More information about the postgis-devel