Quick Links: |
#include <bsls_fuzztest.h>
Public Member Functions | |
FuzzTestHandlerGuard () | |
~FuzzTestHandlerGuard () | |
Static Public Member Functions | |
static Assert::ViolationHandler | getOriginalAssertionHandler () |
This class provides a guard that will install and uninstall three handlers, one for assertion failure, one for BSLS_PRECONDITIONS_BEGIN
, and one for BSLS_PRECONDITIONS_END
, within the protected scope.
bsls::FuzzTestHandlerGuard::FuzzTestHandlerGuard | ( | ) |
Create a guard object, installing FuzzTestPreconditionTracker::handlePreconditionViolation
as well as the BEGIN/END
handler. The behavior is undefined if the current assertion handler is FuzzTestPreconditionTracker::handlePreconditionViolation
.
bsls::FuzzTestHandlerGuard::~FuzzTestHandlerGuard | ( | ) |
Restore the failure handler that was in place when this object was created, reset the precondition BEGIN/END
handlers to no-op, and destroy this guard.
static Assert::ViolationHandler bsls::FuzzTestHandlerGuard::getOriginalAssertionHandler | ( | ) | [static] |
Return the original assertion handler.