forked from CxxTest/cxxtest
CxxTest Unit Testing Framework
License
atomgalaxy/cxxtest
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Overview -------- CxxTest is a unit testing framework for C++ that is similar in spirit to JUnit, CppUnit, and xUnit. CxxTest is easy to use because it does not require precompiling a CxxTest testing library, it employs no advanced features of C++ (e.g. RTTI) and it supports a very flexible form of test discovery. CxxTest is available under the GNU Lesser General Public Licence (LGPL). A user guide is available in doc/guide.pdf. A Simple Example ---------------- 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 --error-printer -o tests.cpp MyTestSuite.h 3. Compile and run! # g++ -o main tests.cpp # ./main Running 1 test(s).OK!
About
CxxTest Unit Testing Framework
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Python 52.0%
- C++ 41.5%
- C 3.3%
- Ruby 1.5%
- Shell 0.8%
- Objective-C 0.8%
- Perl 0.1%