AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
|
UnitTestLogger is a simple wrapper around the initialization and finalize operations of the slic::Logger class that is helpful for unit tests and simple applications in axom. More...
#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/v0.4.0/src/axom/slic/core/UnitTestLogger.hpp>
Public Member Functions | |
UnitTestLogger () | |
Constructor initializes slic loging environment. More... | |
~UnitTestLogger () | |
Destructor finalizes slic loging environment. More... | |
UnitTestLogger is a simple wrapper around the initialization and finalize operations of the slic::Logger class that is helpful for unit tests and simple applications in axom.
To use, create an instance of of this class before tests are run. This initializes the slic logger. When the object is destroyed (e.g., goes out of scope), the slic logger is finalized. For example, when using gtest, a simple main program can be used in each test source file to do this:
* * int main(int argc, char* argv[]) * { * int result = 0; * * ::testing::InitGoogleTest(&argc, argv); * * // create & initialize test logger, finalized when exiting main scope * UnitTestLogger logger; * * result = RUN_ALL_TESTS(); * * return 0; * } * *
|
inline |
Constructor initializes slic loging environment.
References axom::slic::addStreamToMsgLevel(), axom::slic::message::Debug, axom::slic::message::Error, axom::slic::message::Info, axom::slic::initialize(), axom::slic::setLoggingMsgLevel(), and axom::slic::message::Warning.
|
inline |
Destructor finalizes slic loging environment.
References axom::slic::finalize().