ExpectedExceptionTraits

   
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 .

Figure C-6. The template ExpectedExceptionTraits
figs/utf_ac06.gif

Declaration

 template<typename ExceptionType>    struct ExpectedExceptionTraits<ExceptionType> 

Constructors/Destructors

None.

Public Methods


static void expectedException( )

A method to throw an Exception if the expected Exception is not caught.

Protected/Private Methods

None.

Attributes

None.



Unit Test Frameworks
Unit Test Frameworks
ISBN: 0596006896
EAN: 2147483647
Year: 2006
Pages: 146
Authors: Paul Hamill

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net