Name | Date | Size | |
---|---|---|---|
.. | 2015-03-08 17:10:20 | 75 | |
CMakeLists.txt | 2011-06-13 07:39:42 | 149 | |
COPYING | 2006-01-16 03:36:01 | 25.8 KiB | |
cxxtest | 2006-01-16 03:36:01 | 37 | |
cxxtest.spec | 2006-01-16 03:36:01 | 1 KiB | |
cxxtestgen.pl | 2006-01-16 03:36:01 | 14.1 KiB | |
cxxtestgen.py | 2006-01-16 03:36:01 | 20.7 KiB | |
docs | 2015-03-08 17:10:20 | 9 | |
README | 2006-01-16 03:36:01 | 1.2 KiB | |
sample | 2006-01-16 03:36:01 | 24 | |
TODO | 2006-01-16 03:36:01 | 949 | |
Versions | 2006-01-16 03:36:01 | 4.5 KiB |
README
Introduction
------------
CxxTest is a JUnit/CppUnit/xUnit-like framework for C++.
Its advantages over existing alternatives are that it:
- Doesn't require RTTI
- Doesn't require member template functions
- Doesn't require exception handling
- Doesn't require any external libraries (including memory management,
file/console I/O, graphics libraries)
This makes it extremely portable and usable.
CxxTest is available under the GNU Lesser General Public Licence (LGPL).
See http://www.gnu.org/copyleft/lesser.html for the license.
Simple user's guide
-------------------
1. Create a test suite header file:
#include <cxxtest/TestSuite.h>
class MyTestSuite : public CxxTest::TestSuite
{
public:
void testAddition( void )
{
TS_ASSERT( 1 + 1 > 1 );
TS_ASSERT_EQUALS( 1 + 1, 2 );
}
};
2. Generate the tests file:
3. Create a main function that runs the tests
#include <cxxtest/ErrorPrinter.h>
int main( void )
{
CxxText::ErrorPrinter::runAllTests();
return 0;
}
4. Compile and run!
# ./main
Running 1 test(s).OK!
Advanced User's Guide
---------------------
See docs/guide.html.