[Proj] Testing framework
Kristian Evers
kreve at sdfe.dk
Tue May 29 12:25:25 EST 2018
Even,
Your timing is perfect. I was literally just typing up a long email about improving
the test situation in PROJ right now! I was going to propose a larger restructuring
of the tests we already have as well as adding a dedicated testing framework for
testing API functions etc. You’ve taken care of the latter and most pressing issue.
I’ll address the rest of my proposal at a later time I think.
I have only looked briefly at catch2 but it seems good to me. I am happy that you’ve
put your tests in test/.
/Kristian
> On 29 May 2018, at 19:15, Even Rouault <even.rouault at spatialys.com> wrote:
>
> Hi,
>
> I was researching a framework to test my new code (and that could also be used
> to test the existing C API if needed). Currently src/gie.c has ad-hoc testing,
> but it is really limited feature-wise: no nice error message (returns error
> code), no way to make a testcase go on even if a test check fails, etc...
>
> So a dedicated framework seems a better idea, and I've found catch2 :
> https://github.com/catchorg/Catch2/blob/master/docs/Readme.md
>
> One of its main feature it is a header only testing framework, which means we
> can embed it easily in proj source tree, which is practical compared to other
> frameworks I've considered ( googletest, cppunit, etc... ).
> The tut framework used by GDAL and GEOS
> ( http://mrzechonek.github.io/tut-framework ) would also enter this category
> of header(s) only, but it has not as much as activity than catch2.
> There's also Boost.Test, but I was a bit afraid with the boost name in it
> (although apparently it has a standalone mode).
>
> Example of tests I've just written with catch2 (just a minimalistic use of the
> testing framework)
> https://github.com/rouault/proj.4/blob/iso19111_ptr/test/cpp/test_crs.cpp
>
> I'm not particularly calling for a flame debate on the suject, just wanting to
> mention this finding.
>
> Even
>
> --
> Spatialys - Geospatial professional services
> http://www.spatialys.com
> _______________________________________________
> Proj mailing list
> Proj at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/proj
More information about the Proj
mailing list