Which is a better Unit Testing framework to use for C/C++?
- UnitTest++ or
- Google Test
I am new to both. Unittest has less documentation, Google test has a lot of documentation
Which is a better Unit Testing framework to use for C/C++?
I am new to both. Unittest has less documentation, Google test has a lot of documentation
I'd been using Boost.Test for a couple of years, which was sort of ok, and comparable to both of your options.
Then I ran across Catch, and I haven't looked back since. It's just so much more convenient to use, I don't see any reason to go back to another framework.
It's located on GitHub here, and the developer is on SO as well.
Give it a shot. It's more concise and intuitive to use, it's header-only so it's a breeze to set up and use, and the developer is pretty responsive if you need a new feature or find a bug.
From comparing the documentation, Google Test has a lot more features than UnitTest++ and is no harder to use.
I use Google Test and am very happy with it.
I've tried GoogleTest and cpptest.
Google test worked well and was easy to use. The drawback for me was the templates used in GoogleTest broke the code parsing in the IDE. None of the code completion features worked.
CppTest is almost as easy as GoogleTest and has the advantage that it implements a test suite class that you can extend using standard C++ derivation. I ended up choosing cpptest.