Name
ExpectedExceptionTraits
Description
The template
ExpectedExceptionTraits
(see Figure C-6) is
used by TestCaller
to expect an
Exception
. It is an implementation detail and
should not be used directly. A specialization of this template to
expect that no Exception
is defined:
template<> struct ExpectedExceptionTraits<NoExceptionExpected>
The class NoExceptionExpected
is used in this
template specialization and should not be used otherwise.
ExpectedExceptionTraits
belongs to the namespace
CppUnit
. It is declared and implemented in
TestCaller.h.
Declaration
template<typename ExceptionType> struct ExpectedExceptionTraits<ExceptionType>
Constructors/Destructors
None.
Public Methods
-
static void expectedException( )
A method to throw an
Exception
if the expectedException
is not caught.
Protected/Private Methods
None.
Attributes
None.
Get Unit Test Frameworks now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.