diff options
| author | Max Horn | 2006-03-29 10:25:48 +0000 |
|---|---|---|
| committer | Max Horn | 2006-03-29 10:25:48 +0000 |
| commit | 3820593bb8dfdca4e2e17c70b278065b7f7894d9 (patch) | |
| tree | df3e8bebda3abcd99d0882dc9e8c6410f86850fb /test/cxxtest/README | |
| parent | 9c94670e22cb68e32fd38c0d2b009539e35d4a71 (diff) | |
| download | scummvm-rg350-3820593bb8dfdca4e2e17c70b278065b7f7894d9.tar.gz scummvm-rg350-3820593bb8dfdca4e2e17c70b278065b7f7894d9.tar.bz2 scummvm-rg350-3820593bb8dfdca4e2e17c70b278065b7f7894d9.zip | |
bringing cxxtest-3.10.1 to ScummVM's main branch
svn-id: r21488
Diffstat (limited to 'test/cxxtest/README')
| -rw-r--r-- | test/cxxtest/README | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/test/cxxtest/README b/test/cxxtest/README new file mode 100644 index 0000000000..40722cd941 --- /dev/null +++ b/test/cxxtest/README @@ -0,0 +1,63 @@ +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: + +MyTest.h: + #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: + + # cxxtestgen.pl -o tests.cpp MyTestSuite.h + + +3. Create a main function that runs the tests + +main.cpp: + #include <cxxtest/ErrorPrinter.h> + + int main( void ) + { + CxxText::ErrorPrinter::runAllTests(); + return 0; + } + + +4. Compile and run! + + # g++ -o main main.cpp tests.cpp + # ./main + Running 1 test(s).OK! + + +Advanced User's Guide +--------------------- +See docs/guide.html. |
