<div dir="auto"><div>Kristian, as you know, I've been considering PROJ API tests. </div><div dir="auto">I assumed it would must be in C, so an obvious choice was cunit (as used in PostGIS for instance). I haven't arrived with anything though. </div><div dir="auto"><br></div><div dir="auto">It's just a comment, not recommendation to stick with C and cunit. </div><div dir="auto"><br><div data-smartmail="gmail_signature" dir="auto">Mateusz Loskot, <a href="mailto:mateusz@loskot.net">mateusz@loskot.net</a><br>(Sent from mobile) </div><br><div class="gmail_quote" dir="auto"><div dir="ltr">On Tue, 29 May 2018, 19:26 Kristian Evers, <<a href="mailto:kreve@sdfe.dk">kreve@sdfe.dk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Even,<br>
<br>
Your timing is perfect. I was literally just typing up a long email about improving<br>
the test situation in PROJ right now! I was going to propose a larger restructuring<br>
of the tests we already have as well as adding a dedicated testing framework for<br>
testing API functions etc. You’ve taken care of the latter and most pressing issue.<br>
I’ll address the rest of my proposal at a later time I think.<br>
<br>
I have only looked briefly at catch2 but it seems good to me. I am happy that you’ve<br>
put your tests in test/.<br>
<br>
/Kristian<br>
<br>
> On 29 May 2018, at 19:15, Even Rouault <<a href="mailto:even.rouault@spatialys.com" target="_blank" rel="noreferrer">even.rouault@spatialys.com</a>> wrote:<br>
> <br>
> Hi,<br>
> <br>
> I was researching a framework to test my new code (and that could also be used <br>
> to test the existing C API if needed). Currently src/gie.c has ad-hoc testing, <br>
> but it is really limited feature-wise: no nice error message (returns error <br>
> code), no way to make a testcase go on even if a test check fails, etc...<br>
> <br>
> So a dedicated framework seems a better idea, and I've found catch2 :<br>
> <a href="https://github.com/catchorg/Catch2/blob/master/docs/Readme.md" rel="noreferrer noreferrer" target="_blank">https://github.com/catchorg/Catch2/blob/master/docs/Readme.md</a><br>
> <br>
> One of its main feature it is a header only testing framework, which means we <br>
> can embed it easily in proj source tree, which is practical compared to other <br>
> frameworks I've considered ( googletest, cppunit, etc... ).<br>
> The tut framework used by GDAL and GEOS<br>
> ( <a href="http://mrzechonek.github.io/tut-framework" rel="noreferrer noreferrer" target="_blank">http://mrzechonek.github.io/tut-framework</a> ) would also enter this category <br>
> of header(s) only, but it has not as much as activity than catch2.<br>
> There's also Boost.Test, but I was a bit afraid with the boost name in it <br>
> (although apparently it has a standalone mode).<br>
> <br>
> Example of tests I've just written with catch2 (just a minimalistic use of the <br>
> testing framework)<br>
> <a href="https://github.com/rouault/proj.4/blob/iso19111_ptr/test/cpp/test_crs.cpp" rel="noreferrer noreferrer" target="_blank">https://github.com/rouault/proj.4/blob/iso19111_ptr/test/cpp/test_crs.cpp</a><br>
> <br>
> I'm not particularly calling for a flame debate on the suject, just wanting to <br>
> mention this finding.<br>
> <br>
> Even<br>
> <br>
> -- <br>
> Spatialys - Geospatial professional services<br>
> <a href="http://www.spatialys.com" rel="noreferrer noreferrer" target="_blank">http://www.spatialys.com</a><br>
> _______________________________________________<br>
> Proj mailing list<br>
> <a href="mailto:Proj@lists.maptools.org" target="_blank" rel="noreferrer">Proj@lists.maptools.org</a><br>
> <a href="http://lists.maptools.org/mailman/listinfo/proj" rel="noreferrer noreferrer" target="_blank">http://lists.maptools.org/mailman/listinfo/proj</a><br>
<br>
_______________________________________________<br>
Proj mailing list<br>
<a href="mailto:Proj@lists.maptools.org" target="_blank" rel="noreferrer">Proj@lists.maptools.org</a><br>
<a href="http://lists.maptools.org/mailman/listinfo/proj" rel="noreferrer noreferrer" target="_blank">http://lists.maptools.org/mailman/listinfo/proj</a></blockquote></div></div></div>