Teuchos - Trilinos Tools Package Version of the Day
Loading...
Searching...
No Matches
Teuchos_UnitTestBase.cpp
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
12#include "Teuchos_Assert.hpp"
13#include "Teuchos_StandardCatchMacros.hpp"
14
15
16namespace Teuchos {
17
18
19UnitTestBase::UnitTestBase(const std::string groupName, std::string testName)
20{
21 Teuchos::UnitTestRepository::addUnitTest(this, groupName, testName);
22}
23
24
26{
27 bool success = true;
28 try {
30 }
32 return success;
33}
34
35
36} // namespace Teuchos
Unit testing support.
Unit testing support.
Smart reference counting pointer class for automatic garbage collection.
UnitTestBase(const std::string groupName, std::string testName)
virtual void runUnitTestImpl(FancyOStream &out, bool &success) const =0
bool runUnitTest(FancyOStream &out) const
static void addUnitTest(UnitTestBase *unitTest, const std::string groupName, const std::string testName)
Add an unit test (called indirectly through macros.
std::ostream subclass that performs the magic of indenting data sent to an std::ostream object among ...
#define TEUCHOS_STANDARD_CATCH_STATEMENTS(VERBOSE, ERR_STREAM, SUCCESS_FLAG)
Simple macro that catches and reports standard exceptions and other exceptions.
The Teuchos namespace contains all of the classes, structs and enums used by Teuchos,...