1.5.3. Boost.Test

Boost.Test does not need test methods which reside in classes. It is also possible to use free functions. On the other hand there is no mechanism with setup()/teardown() like in CppUnit or CxxTest. Another advantage of Boost.Test is the possibility to catch system exceptions or limit execution time with timeouts.


void test_freeFunction()
{
  ...
}

class AssertMo_test
{
 public:

  static void test_A_includes();
};

void AssertMo_test::test_A_includes()
{
  ...
}

void test_freeFunction()
{
  ...
}

MOCKPP_BOOST_TEST(test_freeFunction);
MOCKPP_BOOST_TEST(AssertMo_test::test_A_includes);