Teuchos - Trilinos Tools Package  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
19 #include "Teuchos_FancyOStream.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 
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
Macro that adds &lt;&lt;std member=&quot;&quot; comp&gt;=&quot;&quot;&gt;&gt; members as attribute members for any class.
std::ostream subclass that performs the magic of indenting data sent to an std::ostream object among ...
Singleton unit testing repository.
Unit test base class.
Class that helps parse command line input arguments from (argc,argv[]) and set options.
Simple wrapper class for raw pointers to single objects where no persisting relationship exists...