CppUnit project page CppUnit home page

testcase.h File Reference

#include <cpput/forwards.h>
#include <cpptl/functor.h>
#include <cpput/resource.h>
#include <cpput/test.h>
#include <string>
#include <set>
#include <vector>

Include dependency graph for testcase.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  CppUT

Classes

class  CppUT::AbstractTestCase
 An abstract test case that can be run. More...
class  CppUT::TestCase
 A test case that can be run. More...

Functions

TestPtr CppUT::makeTestCase (void(*run)(), const std::string &name)
 Creates a TestCase with the specified name and run functor.
TestPtr CppUT::makeTestCase (const CppTL::Functor0 &run, const std::string &name)
 Creates a TestCase with the specified name and run functor.
TestPtr CppUT::makeTestCase (const CppTL::Functor0 &setUp, const CppTL::Functor0 &run, const CppTL::Functor0 &tearDown, const std::string &name)
 Creates a TestCase with the specified name and setUp, run, and tearDown functor.
TestPtr CppUT::makeFailingTestCase (const std::string &name, const Message &message)
 Creates a TestCase with the specified name that will always fail.

The test case run body simply call CPPUT_FAIL() with the specified message.

template<typename FixtureType>
TestPtr CppUT::makeFixtureTestCase (const CppTL::IntrusivePtr< FixtureType > &fixture, const CppTL::Functor0 &run, const std::string &name)
 Creates a TestCase using a fixture-like object.

The test case will delegate implementation of AbstractTestCase setUp() and tearDown() to method of the same name on the given fixture object.


SourceForge Logo hosts this site. Send comments to:
CppUnit Developers