summaryrefslogtreecommitdiff
path: root/include/cppunit/NotEqualException.h
blob: ba48dbb3a4be21c0839f7344d0e78debea573ecd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef NOTEQUALEXCEPTION_H
#define NOTEQUALEXCEPTION_H

#include <cppunit/Exception.h>


namespace CppUnit {


class NotEqualException : public Exception
{
public:
  NotEqualException( std::string expected,
                     std::string actual, 
                     SourceLine sourceLine = SourceLine(),
                     std::string additionalMessage = "" );

#ifdef CPPUNIT_ENABLE_SOURCELINE_DEPRECATED
  NotEqualException( std::string expected,
                     std::string actual, 
                     long lineNumber, 
                     std::string fileName );
#endif

  NotEqualException( const NotEqualException &other );


  virtual ~NotEqualException() throw();

  std::string expectedValue() const;

  std::string actualValue() const;

  std::string additionalMessage() const;

  /*! Copy operator.
   * @param other Object to copy.
   * @return Reference on this object.
   */
  NotEqualException &operator =( const NotEqualException &other );

  Exception *clone() const;

  bool isInstanceOf( const Type &type ) const;

  static Type type();

private:
  std::string m_expected;
  std::string m_actual;
  std::string m_additionalMessage;
};

}  // namespace CppUnit

#endif  // NOTEQUALEXCEPTION_H