C++Spec 1.0.0
BDD testing for C++
Loading...
Searching...
No Matches
CppSpec::Matchers::Throw< A, Ex > Class Template Reference
Inheritance diagram for CppSpec::Matchers::Throw< A, Ex >:
Collaboration diagram for CppSpec::Matchers::Throw< A, Ex >:

Public Member Functions

 Throw (Expectation< A > &expectation)
bool match () override
std::string verb () override
std::string description () override
 Get the description of the Matcher.
std::string failure_message () override
 Get message to give on match failure.
std::string failure_message_when_negated () override
 Get message to give on match failure when negated.
Public Member Functions inherited from CppSpec::Matchers::MatcherBase< A, void * >
 MatcherBase (MatcherBase< A, void * > const &copy)=default
constexpr A & actual ()
void *& expected ()
Expectation< A > & expectation ()
virtual MatcherBase & set_message (std::string message)
 Set a custom failure message.
std::source_location get_location () const
Result run ()
 Run the Matcher object.
virtual bool negated_match ()
Public Member Functions inherited from CppSpec::Pretty
std::string name (const std::string &name) const
std::string name_to_sentence (const std::string &name) const
template<typename O>
std::string inspect_object (const O &o)
 Generate a string of the class and data of an object.

Additional Inherited Members

Public Types inherited from CppSpec::Matchers::MatcherBase< A, void * >
using expected_t
Static Public Member Functions inherited from CppSpec::Pretty
static std::string split_words (const std::string &sym)
static std::string underscore (const std::string &camel_cased_word)
static std::string last (const std::string &s, char delim)
static std::string improve_hash_formatting (const std::string &inspect_string)
template<Util::is_streamable T>
static std::string to_word (const T &item)
 Formats an object as a string when operator<< is available.
template<typename T>
static std::string to_word (const T &item)
template<typename T>
static std::string to_word_type (const T &item)
template<typename A, typename E>
static std::string to_word (const Matchers::MatcherBase< A, E > &matcher)
template<class T>
static std::string to_sentence (const T &item)
 Take a single object and format it as a sentance.
template<class T>
static std::string to_sentence (const std::vector< T > &words)
template<typename T>
static std::string inspect_object (const T &object)
template<>
std::string to_word (const bool &item)
template<>
std::string inspect_object (const char *const &o)
 Specialization for C-style strings.
Public Attributes inherited from CppSpec::Pretty
std::string _name
Protected Attributes inherited from CppSpec::Matchers::MatcherBase< A, void * >
void * expected_
Expectation< A > & expectation_

Member Function Documentation

◆ description()

template<typename A, typename Ex>
std::string CppSpec::Matchers::Throw< A, Ex >::description ( )
overridevirtual

Get the description of the Matcher.

Returns
the description

Reimplemented from CppSpec::Matchers::MatcherBase< A, void * >.

◆ failure_message()

template<typename A, typename Ex>
std::string CppSpec::Matchers::Throw< A, Ex >::failure_message ( )
overridevirtual

Get message to give on match failure.

Returns
the message

Reimplemented from CppSpec::Matchers::MatcherBase< A, void * >.

◆ failure_message_when_negated()

template<typename A, typename Ex>
std::string CppSpec::Matchers::Throw< A, Ex >::failure_message_when_negated ( )
overridevirtual

Get message to give on match failure when negated.

Returns
the message

Reimplemented from CppSpec::Matchers::MatcherBase< A, void * >.

◆ match()

template<class A, class Ex>
bool CppSpec::Matchers::Throw< A, Ex >::match ( )
overridevirtual

◆ verb()

template<class A, class Ex>
std::string CppSpec::Matchers::Throw< A, Ex >::verb ( )
inlineoverridevirtual

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