testsoon.hpp File Reference

Go to the source code of this file.

Namespaces

namespace  testsoon

Classes

class  testsoon::statistics
class  testsoon::test_reporter
 Base class for reporters. More...
class  testsoon::test_failure
struct  testsoon::failure_info
class  testsoon::simple_reporter
class  testsoon::concise_reporter
class  testsoon::range_generator< Type >
class  testsoon::range_generator< Type >::iterator
class  testsoon::array_generator< Type >

Defines

#define TESTSOON_CATCHALL
#define TEST_REGISTRY
 Add this macro to exactly one source file to ensure proper instantiation.
#define TEST_GROUP(name)
 Declare a test group.
#define PTEST(name, fixture, group_fixture, generator)
 Declare a test (positional).
#define TEST(name)
 Declare a test (optional name only).
#define FTEST(name, fixture_class)
 Declare a test with fixture.
#define GFTEST(name)
 Declare a test with default group fixture, named group_fixture.
#define XTEST(named_parameter_sequence)
 Declare a test (named parameters).
#define TESTSOON_Equals(a, b)
 Check that two values are equal.
#define Equals(a, b)
 Check that two values are equal.
#define TESTSOON_Not_equals(a, b)
 Check that two values are not equal.
#define Not_equals(a, b)
 Check that two values are not equal.
#define TESTSOON_Throws(x, t, w)
 Check that an expression throws.
#define Throws(x, t, w)
 Check that an expression throws.
#define TESTSOON_Nothrows(x, t)
#define Nothrows(x, t)
 Check that an expression does not throw.
#define TESTSOON_Check(x)
 Check that an expression is true.
#define Check(x)
 Check that an expression is true.
#define TESTSOON_Check1(x, a)
#define Check1(x, a)
#define TESTSOON_Check2(x, a, b)
#define Check2(x, a, b)

Typedefs

typedef std::vector
< string > 
testsoon::string_vector
typedef std::ostream testsoon::stream_class
typedef concise_reporter testsoon::default_reporter

Functions

template<class T>
string testsoon::object_to_string (T const &object)
string testsoon::object_to_string (std::type_info const &object)
string testsoon::object_to_string (char const *const object)
string testsoon::object_to_string (string const &object)
test_holder & testsoon::tests ()
template<class T>
bool testsoon::operator== (statistics const &x, T const &)
template<class T>
bool testsoon::operator!= (statistics const &x, T const &)
template<class T>
bool testsoon::operator== (T const &, statistics const &x)
template<class T>
bool testsoon::operator!= (T const &, statistics const &x)


Define Documentation

#define Check (  ) 

Check that an expression is true.

If the expression is false, the test will fail.

Parameters:
x The expression to test.

Definition at line 1004 of file testsoon.hpp.

#define Check1 ( x,
 ) 

Definition at line 1011 of file testsoon.hpp.

#define Check2 ( x,
a,
 ) 

Definition at line 1018 of file testsoon.hpp.

#define Equals ( a,
 ) 

Check that two values are equal.

If both values are not equal, the test will fail.

Parameters:
a Some value.
b Another value.

Definition at line 903 of file testsoon.hpp.

#define FTEST ( name,
fixture_class   ) 

Declare a test with fixture.

Parameters:
name The name of the test (not quoted).
fixture_class The fixture class to use.

Definition at line 579 of file testsoon.hpp.

#define GFTEST ( name   ) 

Declare a test with default group fixture, named group_fixture.

Parameters:
name The name of the test (not quoted).

Definition at line 586 of file testsoon.hpp.

#define Not_equals ( a,
 ) 

Check that two values are not equal.

If both values are equal, the test will fail.

Parameters:
a Some value.
b Another value.

Definition at line 923 of file testsoon.hpp.

#define Nothrows ( x,
 ) 

Check that an expression does not throw.

If a specified exception is thrown, the test will fail.

Parameters:
x The expression to test.
t The exception type to check for or "..." (without quotes).

Definition at line 986 of file testsoon.hpp.

#define PTEST ( name,
fixture,
group_fixture,
generator   ) 

Declare a test (positional).

You do not want to use this directly.

Parameters:
name The name of the test (quoted).
fixture A tuple consisting of whether to use a fixture and a fixture class.

Definition at line 553 of file testsoon.hpp.

#define TEST ( name   ) 

Declare a test (optional name only).

Parameters:
name The name of the test (not quoted).

Definition at line 571 of file testsoon.hpp.

#define TEST_GROUP ( name   ) 

Declare a test group.

Test groups are nestable.

Definition at line 530 of file testsoon.hpp.

#define TEST_REGISTRY

Add this macro to exactly one source file to ensure proper instantiation.

Definition at line 518 of file testsoon.hpp.

#define TESTSOON_CATCHALL

Definition at line 93 of file testsoon.hpp.

#define TESTSOON_Check (  ) 

Check that an expression is true.

If the expression is false, the test will fail.

Parameters:
x The expression to test.

Definition at line 993 of file testsoon.hpp.

#define TESTSOON_Check1 ( x,
 ) 

Definition at line 1006 of file testsoon.hpp.

#define TESTSOON_Check2 ( x,
a,
 ) 

Definition at line 1013 of file testsoon.hpp.

#define TESTSOON_Equals ( a,
 ) 

Check that two values are equal.

If both values are not equal, the test will fail.

Parameters:
a Some value.
b Another value.

Definition at line 891 of file testsoon.hpp.

#define TESTSOON_Not_equals ( a,
 ) 

Check that two values are not equal.

If both values are equal, the test will fail.

Parameters:
a Some value.
b Another value.

Definition at line 911 of file testsoon.hpp.

#define TESTSOON_Nothrows ( x,
 ) 

Definition at line 976 of file testsoon.hpp.

#define TESTSOON_Throws ( x,
t,
 ) 

Check that an expression throws.

If no exception is thrown, the test will fail.

Parameters:
x The expression to test.
t The exception type to check for.
w The expected value of caught_exception.what().

Definition at line 947 of file testsoon.hpp.

#define Throws ( x,
t,
 ) 

Check that an expression throws.

If no exception is thrown, the test will fail.

Parameters:
x The expression to test.
t The exception type to check for.
w The expected value of caught_exception.what().

Definition at line 958 of file testsoon.hpp.

#define XTEST ( named_parameter_sequence   ) 

Declare a test (named parameters).

Parameters:
name The name of the test (quoted).

Definition at line 882 of file testsoon.hpp.


Generated on Sat Dec 22 15:34:59 2007 for Test soon by  doxygen 1.5.3