[geos-devel] First example of Unit Tests with TUT

strk at refractions.net strk at refractions.net
Thu Mar 16 05:31:21 EST 2006


Thank you Mateusz,
They build w/out problems.
I've committed them. Next we want them to be run by 'make check'.
Currently it runs but it's invoked with no args and appears to
succeed when in fact does nothing. As we discussed on #postgis
I'll wait for a patch to it.

--strk;

On Thu, Mar 16, 2006 at 02:01:13AM +0100, Mateusz Å?oskot wrote:
> Hi,
> 
> After quite long process of selecting Unit Testing Framework,
> we decided to use TUT (http://tut-framework.sourceforge.net/)
> - very simple but powerful UTF.
> 
> TUT is only one header (+ 2 optional headers) C++ tool,
> so it can be easily incorporated to GEOS sources.
> 
> Boost's UTF is also very good tool, but the main problem is that
> the compatibility has been broken somewhere between
> versions 1.30 - 1.33. Older versions is quite poor toolset in comparison
> to 1.33, but tests written on base of 1.33 can not be used with 1.30.
> 
> After experiencing Boost,
> we decided to use TUT as simple, so stable, tool that does the
> testing job very well.
> Also, nice advantage is that TUT simplicity makes it
> easy to extend with new features and improvements.
> Tonight, I added some small features
> (e.g. displaying number of tests passed for every test group)
> without much learning :-)
> Another advantage I see is the idea of 'reporter' object,
> that makes it easy to add new output format of test results (e.g. HTML
> to publish on the GEOS website) and switch between output formats easily
> (e.g. using command line options).
> 
> So, I've ported 2 new tests of Envelope class and isRectangle function
> using TUT. Both tests are attached to this post, together with TUT
> framework sources.
> 
> As we already decided with strk on the #postgis,
> rest of JTS Unit Tests will be ported using TUT.
> 
> I'd like to encourage everyone interested to take a look at those test,
> try to compile and run them.
> 
> Package:
> - TUT sources: 3 files named as tut_*.h (included by test examples 
> source files)
> 
> - Test examples:
> -- main.cpp file is the entry point of Unit Testing
> application (runner).
> -- test_*.cpp files are test modules - every module consists of
> one test group (a set of test cases)
> 
> 
> All comments and questions are strongly welcome.
> 
> Best regards
> -- 
> Mateusz Łoskot
> http://mateusz.loskot.net


> _______________________________________________
> geos-devel mailing list
> geos-devel at geos.refractions.net
> http://geos.refractions.net/mailman/listinfo/geos-devel


-- 
----------------------------------------------------------------------
State-collected Geographic Data is public property !
Reject the INSPIRE directive.
Sign the petition: http://petition.publicgeodata.org



More information about the geos-devel mailing list