Name
NotEqualException
Description
The class
NotEqualException
(see Figure C-8) is a
subclass of Exception. A
NotEqualException is thrown when an equality
assertion fails. Its Type is
CppUnit::NotEqualException.
NotEqualException belongs to the namespace
CppUnit. It is declared in
NotEqualException.h and implemented in
NotEqualException.cpp.
![]() |
Declaration
class NotEqualException : public Exception
Constructors/Destructors
-
NotEqualException(string expected, string actual, SourceLine sourceLine =SourceLine( ), string additionalMessage = "") A constructor for
NotEqualException. Thestringargumentsexpectedandactualrepresent the values that fail the equality test and cause theNotEqualException. ThesourceLineandadditionalMessagearguments have default empty values.-
NotEqualException(const NotEqualException& other) A copy constructor.
-
virtual ~NotEqualException( ) throw( ) A destructor.
Public Methods
-
NotEqualException& operator=(const NotEqualException& other) A copy operator.
-
string actualValue( ) const Returns the
actualvalue.-
string additionalMessage( ) const Returns the
additionalMessage.-
virtual Exception *clone( ) const Returns a copy of the
NotEqualException.-
string expectedValue( ) const Returns the
expectedvalue.-
virtual bool isInstanceOf(const Type& type) const Returns
TRUEif theNotEqualExceptionis of the givenType. Used for runtime ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access
