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++?
...
I am looking for a test framework that suit my requirements. Following are the steps that I need to perform during automated testing:
SetUp (There are some input files, that needs to be read or copied into some specific folders.)
Execute (Run the stand alone)
Tear Down (Clean up to bring the system in its old state)
Apart from this I...
Is there an equivalent of TestNG's @dataprovider in CPPUnit? I would like to run a test for multiple implementations of an interface.
...
If you've used CPPUnit before, you are probably aware of its assertion_traits class that is templatized to handle arbitrary types. This is what allows it to print the "actual" and "expected" values for non-string types when test cases fail. I have used this with success several times, but for one specific type it isn't working for me. ...
Does CppUnit have the ability to generate an html or xml file of its test cases and test results?
...
I'd like to have an equivalent to CPPUNIT_ASSERT, CPPUNIT_ASSERT_MESSAGE or `CPPUNIT_FAIL' which I can call from some common C code.
Our code is a mix of C and C++. Some older apps and those with specific requirements are coded in C and most, especially newer, are coded in C++.
However, a lot of project-agnostic, common code, such as ...
Hello,
I'm having problems setting up my Hudson server to run cpp unit tests so I can output an .xml file. I tried searching the web for some more straight forward instructions on how to set this up but still don't understand how to. It sounds like I need to set up ant to run...but how??
I'm currently running Hudson ver 1.352.
Any s...
I know that CppUnit will handle the exceptions through:
CPPUNIT_ASSERT_THROW(expression,ExceptionType);
Can anybody explain theoretically how CppUnit will handle the exception?
...
I have a bunch of module tests written in CPPunit with some mocks created by hand. I am looking for a way to migrate them to GoogleTest as smoothly as possible.
Have you tried such an operation?
What was the effort needed?
...
Hi,
I just noticed that CPPUnit2 exists.
Is anyone here using it? Or is CPPUnit the more commonly used of the 2?
Thanks.
...
I am using CppUnit as a unit test framework. Is it possible to select a subset of testcases to execute at runtime?
Is there a filtering option provided within CppUnit to accomodate this?
...
Does the cppunit test frame have different version? if yes, then what is the latest version of it?
...
Getting following error when building cppunit in cppunit frame framework in visual studio 2008
general error c1010070: Failed to load and parse the manifest. The system cannot find the file specified.
...
error is Application has failed to start because MSVCP90D.dll was not found.
...
I’m starting a new firmware project in C++ for Texas Instrument C283xx and C6xxx targets.
The unit tests will not run on the target, but will be compiled with gcc/gcov on a PC with windows (and run as well on PC) with simple metrics for tested code coverage.
The whole project will be part of Cruise Control.NET for continuous integration...
I am new to cppunit. Is there any way to assert that a value must be less than zero? I am looking for something with similar behavior to CPPUNIT_ASSERT_EQUAL().
...
I would like to specify the order of testing in CppUnit. According to my research, the testing order depends on either the compiler or linker and how they came across the files.
How does one specify dependencies in CppUnit?
For example, let us consider a rectangle class that has four lines. Each line contains two point classes. As...
I've been using CppUnit for quite a while now (and am happy with it). As we are using more and more parts of the boost library I had a short look on boost.test and I'm wondering now if I should switch to boost.test in a new project or not.
Can anyone here tell me about the differences between the two frameworks and the benefits (if ther...
I'm trying to use CppUnit test, and this is the simple test code borrowed from CppUnit Cookbook.
The system is Mac OS X with g++ 4.2.1.
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/ui/text/TestRunner.h>
#include <iostream>
class Board
{
int m_x, m_y;
public:
Board(int x, int y) : m_x(x), m_y(y) {}
bool o...
In NUnit, the TestFixtureSetup attribute can be used to mark a method which should be executed once before any tests in the fixture.
Is there an analogous concept in CppUnit?
If not, is there a C++ unit testing framework that supports this concept?
Based on the answer below, here is an example which accomplishes this (following the ad...