Teuchos Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
RCPNodeTracer_UnitTests.cpp
Go to the documentation of this file.
1#include "Teuchos_RCPNode.hpp"
2
4
5
6namespace {
7
8
10
11
12TEUCHOS_UNIT_TEST( RCPNodeTracer, defaults )
13{
14#if defined(TEUCHOS_DEBUG) && defined(HAVE_TEUCHOS_DEBUG_RCP_NODE_TRACING)
15 TEST_EQUALITY_CONST(RCPNodeTracer::isTracingActiveRCPNodes(), true);
16#else
17 TEST_EQUALITY_CONST(RCPNodeTracer::isTracingActiveRCPNodes(), false);
18#endif
19 TEST_EQUALITY_CONST(RCPNodeTracer::getPrintRCPNodeStatisticsOnExit(), false);
20 TEST_EQUALITY_CONST(RCPNodeTracer::getPrintActiveRcpNodesOnExit(), true);
21}
22
23
24TEUCHOS_UNIT_TEST( RCPNodeTracer, changeDefaults )
25{
26 TEST_EQUALITY_CONST(RCPNodeTracer::getPrintRCPNodeStatisticsOnExit(), false);
27 ECHO(RCPNodeTracer::setPrintRCPNodeStatisticsOnExit(true));
28 TEST_EQUALITY_CONST(RCPNodeTracer::getPrintRCPNodeStatisticsOnExit(), true);
29 TEST_EQUALITY_CONST(RCPNodeTracer::getPrintActiveRcpNodesOnExit(), true);
30 (RCPNodeTracer::setPrintActiveRcpNodesOnExit(false));
31 TEST_EQUALITY_CONST(RCPNodeTracer::getPrintActiveRcpNodesOnExit(), false);
32}
33
34
35} // namespace
#define TEST_EQUALITY_CONST(v1, v2)
Assert the equality of v1 and constant v2.
#define ECHO(statement)
Echo the given statement before it is executed.
Reference-counted pointer node classes.
Unit testing support.
#define TEUCHOS_UNIT_TEST(TEST_GROUP, TEST_NAME)
Macro for defining a (non-templated) unit test.
Debug-mode RCPNode tracing class.