Opened 9 years ago

Last modified 5 years ago

#3432 new enhancement

Add mechanism to use standard test geometries in cunit suite

Reported by: dbaston Owned by: pramsey
Priority: medium Milestone: PostGIS Fund Me
Component: postgis Version: master
Keywords: Cc: Kristian Thy

Description

It's currently a bit of a pain to add cunit tests to cover all of the available geometry types, especially when you think of all the different ways to get an EMPTY. I think it would be worthwhile to create a standard list of test geometries that can be pulled in to any individual test as desired.

Maybe this would be as simple as a text file of WKT entries with an ID for each; some helper functions would then let you:

  • bring in an individual geometry by ID
  • bring in an array of all test available geometries meeting certain filters (3d yes/no, measures yes/no, curves yes/no, empty yes/no, etc).

Change History (5)

comment:1 by robe, 8 years ago

Milestone: PostGIS 2.3.0PostGIS 2.4.0

comment:2 by robe, 7 years ago

Milestone: PostGIS 2.4.0PostGIS 2.5.0

comment:3 by komzpa, 6 years ago

Milestone: PostGIS 2.5.0PostGIS 3.0.0

comment:4 by komzpa, 5 years ago

Milestone: PostGIS 3.0.0PostGIS Fund Me

Fuzzers have a concept of "corpus", a directory of input files that exercise a bunch of code paths. libfuzzer has a mode to minimize such a directory, add a new sample and go look for ones that cover some more lines. Such directory can be shared with cunit tests too.

comment:5 by Kristian Thy, 5 years ago

Cc: Kristian Thy added
Note: See TracTickets for help on using tickets.