c++unit-testingcxxtest

CXX Test Framework for C++


How effective is the CXX test framework, given that you are writing unit test cases around the code that you have written. Any bug in the code might as well get translated into a bug in the unit test code as well? Isn't it something like two negatives make a positive?

Also, the time and effort spent on CXX is at least equal to if not more than the coding effort.

Need your thoughts on this since I'm not in favor of this framework being used in my project and am looking for strong points to oppose it.

On the other hand, if you think it's beneficial, please do enlighten me :).


Solution

  • CXX is not very active, and writing unit test generally involves a lot of efforts. But when the first refactoring comes in, you're very grateful of the spent effort.

    I've used Boost.Test & CPPUNIT. I would prefer a little bit Boost.Test, but yes, you have to write your own projects, files etc.

    If you know a tool to generate your skeleton from your code, I'm all ears. :)

    I would suggest that you give a try to Boost.Test and CPPUNIT. If you think there are better it will give you good rounds to oppose CXXUNIT as you will propose alternatives.