Teuchos - Trilinos Tools Package Version of the Day
Static Public Member Functions
Teuchos::UnitTestRepository Class Reference

Singleton unit testing repository. More...

#include <Teuchos_UnitTestRepository.hpp>

List of all members.

Static Public Member Functions

static CommandLineProcessorgetCLP ()
 Return the CLP to add options to.
static void setGloballyReduceTestResult (const bool globallyReduceUnitTestResult)
 Set if the unit tests should reduce pass/fail across processes.
static bool getGloballyReduceTestResult ()
 Get if the unit tests should reduce across processes or not.
static bool runUnitTests (FancyOStream &out)
 Run the registered unit tests.
static int runUnitTestsFromMain (int argc, char *argv[])
 Run the unit tests from main() passing in (argc, argv).
static void addUnitTest (UnitTestBase *unitTest, const std::string groupName, const std::string testName)
 Add an unit test (called indirectly through macros.
static bool verboseUnitTests ()
 Returns if unit tests are verbose or not.

Detailed Description

Singleton unit testing repository.

This class is the universal driver for unit testing. This class should be almost completely invisible to a user of the test harness. The main interaction is through command-line arguments set and processed by calling runUnitTestsFromMain() from a main() function. See --help for details of the options. For a more general overview, see Unit Testing Support.

Definition at line 73 of file Teuchos_UnitTestRepository.hpp.


Member Function Documentation

CommandLineProcessor & Teuchos::UnitTestRepository::getCLP ( ) [static]

Return the CLP to add options to.

Definition at line 204 of file Teuchos_UnitTestRepository.cpp.

void Teuchos::UnitTestRepository::setGloballyReduceTestResult ( const bool  globallyReduceUnitTestResult) [static]

Set if the unit tests should reduce pass/fail across processes.

Definition at line 210 of file Teuchos_UnitTestRepository.cpp.

bool Teuchos::UnitTestRepository::getGloballyReduceTestResult ( ) [static]

Get if the unit tests should reduce across processes or not.

Definition at line 217 of file Teuchos_UnitTestRepository.cpp.

bool Teuchos::UnitTestRepository::runUnitTests ( FancyOStream out) [static]

Run the registered unit tests.

Definition at line 223 of file Teuchos_UnitTestRepository.cpp.

int Teuchos::UnitTestRepository::runUnitTestsFromMain ( int  argc,
char *  argv[] 
) [static]

Run the unit tests from main() passing in (argc, argv).

Returns:
Returns the appropriate int for main()

Definition at line 404 of file Teuchos_UnitTestRepository.cpp.

void Teuchos::UnitTestRepository::addUnitTest ( UnitTestBase unitTest,
const std::string  groupName,
const std::string  testName 
) [static]

Add an unit test (called indirectly through macros.

unittest [in] The unit test. NOTE: the memory of *unittest must be persistant.

Definition at line 432 of file Teuchos_UnitTestRepository.cpp.

bool Teuchos::UnitTestRepository::verboseUnitTests ( ) [static]

Returns if unit tests are verbose or not.

This can be used in individual unit tests that need to know if the unit test harness is running in verbose mode. This is useful when the unit test's std::ostream 'out' can not be printed to (for example, when Fortran is testing is running).

Definition at line 441 of file Teuchos_UnitTestRepository.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines