Qt-Mocks 0.8.0-alpha.9
Mocking library using Qt Test inspired by Google Test
 
Loading...
Searching...
No Matches
qt_mocks::ErrorRaiser< ExceptionType > Class Template Referencefinal

Encapsulates an error to be raised by a mocked function. More...

#include <Expectation.hpp>

Collaboration diagram for qt_mocks::ErrorRaiser< ExceptionType >:

Public Member Functions

template<typename ... ExceptionArguments>
 ErrorRaiser (ExceptionArguments &&... arguments)
 Full initialization constructor.
 
void doThrow () const
 This throws the exception that was stored.
 

Detailed Description

template<typename ExceptionType>
class qt_mocks::ErrorRaiser< ExceptionType >

Encapsulates an error to be raised by a mocked function.

Template Parameters
ExceptionTypeThe type of the exception to be raised.

Constructor & Destructor Documentation

◆ ErrorRaiser()

template<typename ExceptionType>
template<typename ... ExceptionArguments>
qt_mocks::ErrorRaiser< ExceptionType >::ErrorRaiser ( ExceptionArguments &&... arguments)
explicit

Full initialization constructor.

Template Parameters
ExceptionArgumentsThe argument types used to construct the error.
Parameters
argumentsA list of arguments used to construct the error object.

Member Function Documentation

◆ doThrow()

template<typename ExceptionType>
void qt_mocks::ErrorRaiser< ExceptionType >::doThrow ( ) const

This throws the exception that was stored.

Exceptions
ExceptionTypeThe stored exception to be thrown.