C++ Unit Testing Libraries

Mr. Boy picture Mr. Boy · Jan 10, 2010 · Viewed 17.3k times · Source

I've come across cppunit but it didn't look super-easy to use (maybe I didn't look hard, maybe because C++ doesn't work like Java/C#). Are there widely used, simple alternatives?

In fact, is cppunit the standard unit testing framework for C++?

Answer

Grant Limberg picture Grant Limberg · Jan 10, 2010

There is no standard unit testing library for C++. There are many choices to choose from; cppunit being one of them.

At my company we use Google Test along with its partner Google Mock for unit testing and object mocking. I find them both combined easier to use and much more powerful than cppunit.