[geos-devel] Unit Tests port
Charlie Savage
cfis at interserv.com
Tue Feb 28 21:14:57 EST 2006
Hi Mateusz,
Good luck with this - I think it is a great idea. Did you see the
follow up article that Noel wrote a couple months back?
http://www.gamesfromwithin.com/articles/0512/000103.html
He points out another framework, based loosely on cppunitlite
http://cnicholson.net/content.php?id=52
I've never used any of these frameworks, so don't have any recommendations.
For a completely different approach, you could use Python or Ruby to
test GEOS via the SWIG bindings. If you look in CVS, I have ported the
C++ example to Ruby and turned it into a bunch of unit tests. Note that
GDAL takes this approach, it has a whole test suite written in Python.
The advantage is that its really fast to develop tests and you have full
access to the C++ api. The disadvantage is there is an extra level of
wrapping going on - which shouldn't matter for testing functionality but
comes into play when managing memory.
Thanks,
Charlie
Mateusz Łoskot wrote:
> Hi,
>
> I started to think about porting JTS Unit Tests to C++ for GEOS.
> During dynamic development Unit Tests can be very helpful, they save
> much time and help to track bugs/fixes lifetime, and many many more.
>
> So, first, I think it's important to choose appropriate
> tool - Unit-Testing Framework (UTF).
> There are many UTFs so I'm a bit confused which would be best ;-)
> I'm going to make some short research in this field but I'd like to
> ask on the list if anyone has some prefered/recommended UTF and could
> present its pros/cons to make some comparison.
>
> My favourites are:
> 1 - CxxTest - I have not used it, but it gots max votes in the
> article below
> http://cxxtest.sourceforge.net/
>
> 2 - Boost.Test - quite complex but powerful
> http://www.boost.org/libs/test/doc/
>
> 3 - TUT - very light and simple UTF
> http://tut-framework.sourceforge.net
>
> Here is interesting article exploring available UTFs
> (NOTE: this article is 2 years old):
> http://www.gamesfromwithin.com/articles/0412/000061.html
>
> Thanks for your comments!
> Cheers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3166 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.osgeo.org/pipermail/geos-devel/attachments/20060228/b6f4bf1a/smime.bin
More information about the geos-devel
mailing list