Coder Social home page Coder Social logo

carlos-puerto-garcia / cxxtest Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cxxtest/cxxtest

0.0 1.0 0.0 4.17 MB

CxxTest Unit Testing Framework

Home Page: http://cxxtest.com

License: GNU Lesser General Public License v3.0

Shell 0.42% Python 61.44% Batchfile 0.01% C++ 36.44% Hack 0.03% C 1.34% CMake 0.21% Smarty 0.08% Makefile 0.04%

cxxtest's Introduction

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!

cxxtest's People

Contributors

abatyiev avatar atomgalaxy avatar chickenkiller avatar coolhandmook avatar gluttton avatar jsiirola avatar kfitch avatar kindkaktus avatar kwadrat avatar oliviers-oss avatar ptomulik avatar sorbits avatar whart222 avatar yazug avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.