Hegel 0.11.4
Property-based testing for C++
Loading...
Searching...
No Matches
hegel::GTestFailure Class Reference

The exception the GoogleTest integration raises for a test case that fails an assertion. More...

#include <gtest.h>

Inheritance diagram for hegel::GTestFailure:
hegel::FailureOrigin

Public Member Functions

 GTestFailure (std::string origin, const std::string &message)
std::string failure_origin () const override
Public Member Functions inherited from hegel::FailureOrigin
 FailureOrigin (const FailureOrigin &)=default
 Copy-constructs. An origin holds no state of its own.
FailureOrigin & operator= (const FailureOrigin &)=default

Detailed Description

The exception the GoogleTest integration raises for a test case that fails an assertion.

The message holds every failed assertion of that case, each prefixed with its source position.

Assertions on different lines are different bugs, and failing different combinations of assertions count as different bugs.

Constructor & Destructor Documentation

◆ GTestFailure()

hegel::GTestFailure::GTestFailure ( std::string origin,
const std::string & message )
inline
Parameters
originThe positions of the failed assertions.
messageThe failed assertions of one test case.

Member Function Documentation

◆ failure_origin()

std::string hegel::GTestFailure::failure_origin ( ) const
inlineoverridevirtual
Returns
The positions of the assertions this case failed.

Implements hegel::FailureOrigin.


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