This library supports ROOT's unit tests. It implements two main functions
It provides a static library target ROOT::TestSupport
. All google tests that are defined using ROOT_ADD_GTEST
will be linked against this target. When a test executable starts up, this will install a ROOT message handler that intercepts all messages / diagnostics. If a message with severity > kInfo is issued, this message handler will register a test failure.
This way, we are ensuring that no gtest can issue unnoticed warning or error messages.
However, some warnings and errors are expected as the result of certain tests. Therefore, the library provides tools to declare when messages are expected during a test. For this,
ROOT/TestSupport.hxx
.This could look as follows: