Question

I am in a project where we application for POS devices. The language is C/C++, we use a cross-compiler, eclipse kepler and ubuntu. I wonder what is the best unit testing framework for my case. I would like to use something enough documented and preferably simple.

I tried with CppUTest but I dont find the documentation for its eclipse plugin to be sufficient https://github.com/cpputest/CppUTestEclipsePlugin.

Another personal experience on a unit test framework using this environment would very be helpful.

Was it helpful?

Solution

GTest is an easy to use framework that is relatively portable and doesn't carry around to many dependencies.

It won't allow you to do anything overly fancy, but I've always found it extremely easy to use, generic to work with any project, and takes minimal amounts of setting up. It also works in conjunction with GMock to add support for mocks which is always nice. It takes a little over ten minutes to set up and compile. From there it's extremely easy to setup a test bed and it is easily extendable.

Here's a link to the sample page. https://code.google.com/p/googletest/source/browse/trunk/samples/sample1_unittest.cc

OTHER TIPS

I think CppUnit would be suitable for your case since you use Eclipse and C/C++. I think it is well documented and you can find lots of examples about that.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top