Hacker News new | comments | show | ask | jobs | submit login

I don't really see the advantage of Catch over http://unittest-cpp.sourceforge.net/

UnitTest++ was written by Noel Llopis, is small, tasteful, fast, and supports fixtures (and nested fixtures) via structs and struct inheritance.

Honest question: Why would I use Catch instead?




I'm in the same boat (having used UnitTest++ for years) and I wonder the same, though I do see some points already:

- adding a custom main() to unittest++ was pretty messy

- unittest++ is not single-header, meaning you have to recompile all flavours everytime you switch toolsets

- that nested sections stuff looks good and readable, so even though it might be doable with unittest++, this really attracts me more

That being said, I would like to hear from the author or anyone else who can compare them. But likely I'm going to use this for the next project just to check it out.


I use Catch over UnitTest++ because I found it first and it was dead simple to get started with.

We don't do unit-testing as part of our official development process where I work, so I was looking for something that I could quickly try out and get started with in my spare moments. I read about several frameworks and Catch seemed to fit the bill best.

Looking over the UnitTest++ web site just now it appears to be nearly as easy as Catch, so if I had found it first I probably would have given it a try.

For those not currently doing any unit testing who want to get a feel for what it is all about, I highly recommend Catch as a "my first unit testing framework."


I'm a big fan of UnitTest++, but one thing that would tempt me about Catch is the single header file.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: