OTest2
A C++ testing framework
Public Member Functions | List of all members
OTest2::UserDataWrongTypeException Class Reference

An exception thrown if the expected type of a user datum is different than the actual one. More...

#include <userdata.h>

Inheritance diagram for OTest2::UserDataWrongTypeException:
Inheritance graph
[legend]
Collaboration diagram for OTest2::UserDataWrongTypeException:
Collaboration graph
[legend]

Public Member Functions

 UserDataWrongTypeException (const std::string &name_, const std::string &actual_, const std::string &expected_)
 Ctor. More...
 
 UserDataWrongTypeException (UserDataWrongTypeException &&exc_) noexcept
 Move ctor. More...
 
 ~UserDataWrongTypeException ()
 Dtor. More...
 
 UserDataWrongTypeException (const UserDataWrongTypeException &)=delete
 
UserDataWrongTypeExceptionoperator= (const UserDataWrongTypeException &)=delete
 
virtual std::string reason () const override
 Get exception reason. More...
 
- Public Member Functions inherited from OTest2::Exception
 Exception (const Exception &)=delete
 
Exceptionoperator= (const Exception &)=delete
 
virtual const char * what () const noexcept
 

Additional Inherited Members

- Protected Member Functions inherited from OTest2::Exception
 Exception ()
 Ctor. More...
 
 Exception (Exception &&exc_) noexcept
 Move ctor. More...
 
virtual ~Exception ()
 Dtor. More...
 

Detailed Description

An exception thrown if the expected type of a user datum is different than the actual one.

Definition at line 77 of file userdata.h.

Constructor & Destructor Documentation

◆ UserDataWrongTypeException() [1/3]

OTest2::UserDataWrongTypeException::UserDataWrongTypeException ( const std::string &  name_,
const std::string &  actual_,
const std::string &  expected_ 
)
explicit

Ctor.

Parameters
name_Name of the user datum
actual_Actual type (stored in the user data object)
expected_Expected type (requested by the test description)

Definition at line 50 of file userdata.cpp.

◆ UserDataWrongTypeException() [2/3]

OTest2::UserDataWrongTypeException::UserDataWrongTypeException ( UserDataWrongTypeException &&  exc_)
noexcept

Move ctor.

Definition at line 60 of file userdata.cpp.

◆ ~UserDataWrongTypeException()

OTest2::UserDataWrongTypeException::~UserDataWrongTypeException ( )

Dtor.

Definition at line 69 of file userdata.cpp.

◆ UserDataWrongTypeException() [3/3]

OTest2::UserDataWrongTypeException::UserDataWrongTypeException ( const UserDataWrongTypeException )
delete

Member Function Documentation

◆ operator=()

UserDataWrongTypeException& OTest2::UserDataWrongTypeException::operator= ( const UserDataWrongTypeException )
delete

◆ reason()

std::string OTest2::UserDataWrongTypeException::reason ( ) const
overridevirtual

Get exception reason.

Returns

Implements OTest2::Exception.

Definition at line 73 of file userdata.cpp.


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