Teuchos - Trilinos Tools Package
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
core
src
Teuchos_UnitTestRepository.hpp
Go to the documentation of this file.
1
// @HEADER
2
// *****************************************************************************
3
// Teuchos: Common Tools Package
4
//
5
// Copyright 2004 NTESS and the Teuchos contributors.
6
// SPDX-License-Identifier: BSD-3-Clause
7
// *****************************************************************************
8
// @HEADER
9
10
#ifndef TEUCHOS_UNIT_TEST_REPOSITORY_HPP
11
#define TEUCHOS_UNIT_TEST_REPOSITORY_HPP
12
13
17
18
19
#include "Teuchos_FancyOStream.hpp"
20
#include "
Teuchos_StandardMemberCompositionMacros.hpp
"
21
#include "Teuchos_Ptr.hpp"
22
23
24
namespace
Teuchos
{
25
26
27
class
UnitTestBase
;
28
29
30
class
CommandLineProcessor
;
31
32
41
class
TEUCHOSCORE_LIB_DLL_EXPORT UnitTestRepository {
42
public
:
43
45
static
CommandLineProcessor
&
getCLP
();
46
48
static
void
setGloballyReduceTestResult
(
const
bool
globallyReduceUnitTestResult);
49
51
static
bool
getGloballyReduceTestResult
();
52
54
static
bool
runUnitTests
(
FancyOStream
&out);
55
60
static
int
runUnitTestsFromMain
(
int
argc,
char
* argv[]);
61
66
static
void
addUnitTest
(
UnitTestBase
*unitTest,
const
std::string groupName,
67
const
std::string testName);
68
76
static
bool
verboseUnitTests
();
77
78
private
:
79
80
UnitTestRepository();
81
82
static
void
setUpCLP(
const
Ptr<CommandLineProcessor>
& clp);
83
84
class
InstanceData;
85
86
static
InstanceData& getData();
87
88
static
bool
runUnitTestImpl(
const
UnitTestBase
&unitTest,
FancyOStream
&out);
89
90
};
91
92
93
}
// namespace Teuchos
94
95
96
#endif
// TEUCHOS_UNIT_TEST_REPOSITORY_HPP
Teuchos_StandardMemberCompositionMacros.hpp
Macro that adds <<std member comp>> members as attribute members for any class.
Teuchos::CommandLineProcessor
Class that helps parse command line input arguments from (argc,argv[]) and set options.
Definition
Teuchos_CommandLineProcessor.hpp:44
Teuchos::Ptr
Simple wrapper class for raw pointers to single objects where no persisting relationship exists.
Definition
Teuchos_PtrDecl.hpp:71
Teuchos::UnitTestBase
Unit test base class.
Definition
Teuchos_UnitTestBase.hpp:27
Teuchos::UnitTestRepository::verboseUnitTests
static bool verboseUnitTests()
Returns if unit tests are verbose or not.
Definition
Teuchos_UnitTestRepository.cpp:413
Teuchos::UnitTestRepository::runUnitTests
static bool runUnitTests(FancyOStream &out)
Run the registered unit tests.
Definition
Teuchos_UnitTestRepository.cpp:195
Teuchos::UnitTestRepository::getGloballyReduceTestResult
static bool getGloballyReduceTestResult()
Get if the unit tests should reduce across processes or not.
Definition
Teuchos_UnitTestRepository.cpp:189
Teuchos::UnitTestRepository::getCLP
static CommandLineProcessor & getCLP()
Return the CLP to add options to.
Definition
Teuchos_UnitTestRepository.cpp:176
Teuchos::UnitTestRepository::runUnitTestsFromMain
static int runUnitTestsFromMain(int argc, char *argv[])
Run the unit tests from main() passing in (argc, argv).
Definition
Teuchos_UnitTestRepository.cpp:376
Teuchos::UnitTestRepository::addUnitTest
static void addUnitTest(UnitTestBase *unitTest, const std::string groupName, const std::string testName)
Add an unit test (called indirectly through macros.
Definition
Teuchos_UnitTestRepository.cpp:404
Teuchos::UnitTestRepository::setGloballyReduceTestResult
static void setGloballyReduceTestResult(const bool globallyReduceUnitTestResult)
Set if the unit tests should reduce pass/fail across processes.
Definition
Teuchos_UnitTestRepository.cpp:182
Teuchos::FancyOStream
basic_FancyOStream< char > FancyOStream
Definition
Teuchos_FancyOStream.hpp:813
Teuchos
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...
Generated by
1.17.0