BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bsls::FuzzTestHandlerGuard Class Reference

#include <bsls_fuzztest.h>

Public Member Functions

 FuzzTestHandlerGuard ()
 
 ~FuzzTestHandlerGuard ()
 

Static Public Member Functions

static Assert::ViolationHandler getOriginalAssertionHandler ()
 Return the original assertion handler.
 

Detailed Description

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.

See bsls_fuzztest

Constructor & Destructor Documentation

◆ FuzzTestHandlerGuard()

bsls::FuzzTestHandlerGuard::FuzzTestHandlerGuard ( )
inline

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.

◆ ~FuzzTestHandlerGuard()

bsls::FuzzTestHandlerGuard::~FuzzTestHandlerGuard ( )
inline

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.

Member Function Documentation

◆ getOriginalAssertionHandler()

Assert::ViolationHandler bsls::FuzzTestHandlerGuard::getOriginalAssertionHandler ( )
inlinestatic

The documentation for this class was generated from the following file: