I know there are already a few questions regarding recommendations for C++ unit test frameworks, but all the answers did not help as they just recommend one of the frameworks but do not provide any information about a (feature) comparison.
I think the most interesting frameworks are CppUnit, Boost and the new Google testing framework. Has anybody done any comparison yet?
A new player is Google Test (also known as Google C++ Testing Framework) which is pretty nice though.
#include <gtest/gtest.h>
TEST(MyTestSuitName, MyTestCaseName) {
int actual = 1;
EXPECT_GT(actual, 0);
EXPECT_EQ(1, actual) << "Should be equal to one";
}
Main features:
ASSERT_EQ(5, Foo(i)) << " where i = " << i;
SCOPED_TRACE
for subroutine loops