#include <Protector.h>
Inheritance diagram for Protector:
List of all members.
Protector are used to globably 'decorate' a test case. The most common usage of Protector is to catch exception that do not subclass std::exception, such as MFC CException class or Rogue Wave RWXMsg class, and capture the message associated to the exception. In fact, CppUnit capture message from Exception and std::exception using a Protector.
Protector are chained. When you add a Protector using TestResult::pushProtector(), your protector is in fact passed as a Functor to the first protector of the chain.
TestCase protects call to setUp(), runTest() and tearDown() by calling TestResult::protect().
Because the protector chain is handled by TestResult, a protector can be active for a single test, or a complete test run.
Here are some possible usages:
[virtual]
[protected]
[pure virtual]
Implemented in DefaultProtector, and ProtectorChain.
SourceLine()
[protected]
[protected]
[protected]