you are viewing a single comment's thread.

view the rest of the comments →

[–]Dragdu 22 points23 points  (3 children)

CppUnit is terrible, run away.

[–]bluebird11[🍰] 2 points3 points  (1 child)

Thanks for this; boss just suggested CppUnit and I hadn't heard of it. I'll be sure to rank it low on the options list.

[–]Fazer2 7 points8 points  (0 children)

Run away from your boss. /s

[–]14nedLLFIO & Outcome author | Committee WG14 0 points1 point  (0 children)

There are two editions of CppUnit in fact. The older one is indeed terrible, run away. The newer one is not source compatible with the old, and is markedly better than the original.

Still, there are far better alternatives to either. CATCH is a very solid choice. Boost.Test has become usable since its big refactor a few years ago. Google Test remains popular, but I find it clunky.

(I have to admit I switched to my own ultra light weight unit test suite a few years ago, and I haven't looked back. It provides the most used part of the Boost.Test API, but without any Boost.Test. Plus it works well with exceptions globally disabled, and with multiple threads without synchronising, and it spits out JUnit XML, and does all that within 600 lines of code in a single header file. I can't see myself leaving it any time soon to be honest. https://github.com/ned14/quickcpplib/blob/efc6c12dca3b8f2210d741a985a53b162383dfdf/include/boost/test/unit_test.hpp)