This class provides a guard that will install and uninstall four handlers, one for assertion failure, one for review failure, one for BSLS_PRECONDITIONS_BEGIN, and one for BSLS_PRECONDITIONS_END, within its protected scope.
Declared in <bsls_fuzztest.h>
class FuzzTestHandlerGuard;
| Name | Description |
|---|---|
FuzzTestHandlerGuard [constructor] | Create a guard object, installing FuzzTestPreconditionTracker::handleAssertViolation, FuzzTestPreconditionTracker::handleReviewViolation, and the BEGIN/END handler. The behavior is undefined if the current assertion handler is FuzzTestPreconditionTracker::handleAssertViolation or the current review handler is FuzzTestPreconditionTracker::handleAssertViolation. |
~FuzzTestHandlerGuard [destructor] | 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. The behavior is undefined unless the current assertion handler is FuzzTestPreconditionTracker::handleAssertViolation and the current review handler is FuzzTestPreconditionTracker::handleAssertViolation. |
getOriginalAssertionHandler | Return the original assertion handler. |
getOriginalReviewHandler | Return the original review handler. |
| Name | Description |
|---|---|
instance | Return the current fuzz test handler guard. The behavior is undefined unless a fuzz test handler guard is currently in scope. |