OKlibrary  0.2.1.6
OKlib::TestSystem::RunTest Class Reference

Responsible for running tests. More...

#include <RunTest_Declarations.hpp>

List of all members.

Public Types

typedef ::OKlib::TestSystem::Test test_type
 The type of the test objects.
typedef test_typetest_pointer_type
typedef boost::ptr_list
< test_type
container_type

Public Member Functions

 RunTest (test_pointer_type const test)
 The only constructor; inserts parameter "test" into the (singleton-)container of test-object(-pointers).

Static Public Member Functions

static int run_tests (std::ostream &err, std::ostream &messages, std::ostream &log,::OKlib::TestSystem::TestLevel &level)
 Runs all the tests in the build-in test-container; return Unix error code.
static int run_tests (std::ostream &err, std::ostream &messages, std::ostream &log,::OKlib::TestSystem::TestLevel &level, container_type &test_objects)
 Runs all the tests in the provided container test_objects; return Unix error code.

Detailed Description

Responsible for running tests.

Objects of type RunTest are initialised with a pointer to a TestSystem::Test object, and the pointer is put into a global container. Via the static member function RunTest::run_test all these tests are executed.

Meaning of the three output-streams passed to run_tests:

  • err : error messages (extracted from the exceptions thrown by test-meta-functions)
  • messages : messages from the test system, reporting on the general progress
  • log : messages by the test-meta-functions (typically reporting on special test conditions).

Definition at line 43 of file RunTest_Declarations.hpp.


Member Typedef Documentation

Definition at line 52 of file RunTest_Declarations.hpp.

The type of the test objects.

Definition at line 50 of file RunTest_Declarations.hpp.


Constructor & Destructor Documentation

OKlib::TestSystem::RunTest::RunTest ( test_pointer_type const  test) [inline]

The only constructor; inserts parameter "test" into the (singleton-)container of test-object(-pointers).

RunTest takes over ownership of the object pointed to by "test".

Definition at line 40 of file RunTest_DesignStudy.hpp.


Member Function Documentation

static int OKlib::TestSystem::RunTest::run_tests ( std::ostream &  err,
std::ostream &  messages,
std::ostream &  log,
::OKlib::TestSystem::TestLevel level 
) [static]

Runs all the tests in the build-in test-container; return Unix error code.

Referenced by main().

static int OKlib::TestSystem::RunTest::run_tests ( std::ostream &  err,
std::ostream &  messages,
std::ostream &  log,
::OKlib::TestSystem::TestLevel level,
container_type test_objects 
) [static]

Runs all the tests in the provided container test_objects; return Unix error code.


The documentation for this class was generated from the following files: