Skip to main content

SCons tool for building and running unit tests based on CxxTest framework

Project description

Travis CI build status

SCons tool to compile and run unit tests based on CxxTest framework. This tool is extracted from sources found at CxxTest Repository.

Installation

First, install CxxTest framework, for example (Debian):

sudo apt-get install cxxtest

Installing with pipenv

You should use this in projects using pipenv

pipenv install --dev scons-tool-cxxtest

Alternativelly, you may add the following snippet to your Pipfile

[dev-packages]
scons-tool-cxxtest = "*"

Installing as a git submodule

  1. Create new git repository:

    mkdir /tmp/prj && cd /tmp/prj
    touch README.rst
    git init
  2. Add the scons-tool-cxxtest as a submodule:

    git submodule add git://github.com/ptomulik/scons-tool-cxxtest.git site_scons/site_tools/cxxtest

Usage example

  1. Create simple test file

    // MyTestSuite1.t.h
    #include <cxxtest/TestSuite.h>
    class MyTestSuite1 : public CxxTest::TestSuite
    {
    public:
      void testAddition(void)
      {
        TS_ASSERT(1 + 1 > 1);
        TS_ASSERT_EQUALS(1 + 1, 2);
      }
    };
  2. Create simple SConstruct file

    # SConstruct
    env = Environment(tools = ['default', 'cxxtest'])
    env.CxxTest('MyTestSuite1')
  3. Try it out:

    scons check

LICENSE

See license text in __init__.py.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scons-tool-cxxtest-0.1.2.tar.gz (7.5 kB view hashes)

Uploaded Source

Built Distribution

scons_tool_cxxtest-0.1.2-py3-none-any.whl (18.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page