Easy to use, portable.
To avoid the generate the library. all implement in the header files.
Project home page: http://sourceforge.net/projects/cmut/
The only some class, such as TestCase, TestRunner, TestResult, ResultFormater.
TODO: some more detail...
An example to demo how to use the library.
#include <cmut/testcase.hpp>
#include <cmut/testrunner.hpp>
class MyTestCase : public cm::TestCase
{
public:
MyTestCase()
: TestCase("MyTestCase")
{
}
void run()
{
std::cout << "run mytestcase" << std::endl;
CM_UT_ASSERT(0);
}
};
class MyTest2 : public cm::TestCase
{
public:
MyTest2()
: TestCase("MyTest2")
{
}
void run()
{
CM_UT_ASSERT(33==1+32);
CM_UT_ASSERT_MESSAGE(44==2+41, "oops");
}
};
int main()
{
cm::TestRunner* runner = cm::TestRunner::instance();
//runner->setResultFormater(std::auto_ptr |
|---|
| View the example file. |
Thanks for |
|---|