Skip to content
CxxTest Unit Testing Framework
Python C++ C Shell CMake Smarty
Branch: master
Clone or download

Latest commit

atomgalaxy Merge pull request #111 from yazug/value_traits_warning_hunting
Warning hunting cleanup in ValueTraits.cpp

Thanks! This is good for merging straight.
Latest commit 48bf84d Oct 22, 2017

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
admin
bin Added .bat wrapper for scons integration on windows. Jan 24, 2012
build_tools
cxxtest
doc Fixed some formatting and a typo. Oct 22, 2017
python Delete trailing spaces Jan 12, 2017
sample Delete trailing spaces Jan 12, 2017
test Added tests for the feature from pullrequest 116. Oct 22, 2017
.gitignore Finally merged Oliviers-OSS-patchs_oc_5. Oct 22, 2017
COPYING Updating LGPL version and doc reference. Mar 16, 2013
README Delete trailing spaces Jan 12, 2017
Versions Tagging CxxTest 4.4 Aug 5, 2015

README

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 can be downloaded from http://cxxtest.com.


A Simple Example
----------------

1. Create a test suite header file:

MyTestSuite.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 cxxtest tests (1 test).OK!

You can’t perform that action at this time.