Teuchos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Static Public Member Functions | Private Member Functions | Static Private Member Functions | List of all members
Teuchos::UnitTestRepository Class Reference

Singleton unit testing repository. More...

#include <Teuchos_UnitTestRepository.hpp>

Classes

class  InstanceData
 

Static Public Member Functions

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

Private Member Functions

 UnitTestRepository ()
 

Static Private Member Functions

static void setUpCLP (const Ptr< CommandLineProcessor > &clp)
 
static InstanceDatagetData ()
 
static bool runUnitTestImpl (const UnitTestBase &unitTest, FancyOStream &out)
 

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 Teuchos_UnitTest_grp.

Definition at line 73 of file Teuchos_UnitTestRepository.hpp.

Constructor & Destructor Documentation

Teuchos::UnitTestRepository::UnitTestRepository ( )
private

Definition at line 455 of file Teuchos_UnitTestRepository.cpp.

Member Function Documentation

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

Return the CLP to add options to.

Definition at line 209 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 215 of file Teuchos_UnitTestRepository.cpp.

bool Teuchos::UnitTestRepository::getGloballyReduceTestResult ( )
static

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

Definition at line 222 of file Teuchos_UnitTestRepository.cpp.

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

Run the registered unit tests.

Definition at line 228 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 409 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 437 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 446 of file Teuchos_UnitTestRepository.cpp.

void Teuchos::UnitTestRepository::setUpCLP ( const Ptr< CommandLineProcessor > &  clp)
staticprivate

Definition at line 459 of file Teuchos_UnitTestRepository.cpp.

UnitTestRepository::InstanceData & Teuchos::UnitTestRepository::getData ( )
staticprivate

Definition at line 529 of file Teuchos_UnitTestRepository.cpp.

bool Teuchos::UnitTestRepository::runUnitTestImpl ( const UnitTestBase unitTest,
FancyOStream out 
)
staticprivate

Definition at line 536 of file Teuchos_UnitTestRepository.cpp.


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