Menu

[r155]: / trunk / cppunit / src / cppunit / NotEqualException.cpp  Maximize  Restore  History

Download this file

83 lines (60 with data), 1.5 kB

 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#include <cppunit/NotEqualException.h>
namespace CppUnit {
NotEqualException::NotEqualException( std::string expected,
std::string actual,
long lineNumber,
std::string fileName ) :
Exception( "Expected: " + expected + ", but was: " + actual,
lineNumber,
fileName ),
m_expected( expected ),
m_actual( actual )
{
}
NotEqualException::NotEqualException( const NotEqualException &other ) :
Exception( other ),
m_expected( other.m_expected ),
m_actual( other.m_actual )
{
}
NotEqualException::~NotEqualException() throw()
{
}
NotEqualException &
NotEqualException::operator =( const NotEqualException &other )
{
Exception::operator =( other );
if ( &other != this )
{
m_expected = other.m_expected;
m_actual = other.m_actual;
}
return *this;
}
Exception *
NotEqualException::clone() const
{
return new NotEqualException( *this );
}
bool
NotEqualException::isInstanceOf( const Type &exceptionType ) const
{
return exceptionType == type() ||
Exception::isInstanceOf( exceptionType );
}
Exception::Type
NotEqualException::type()
{
return Type( "CppUnit::NotEqualException" );
}
std::string
NotEqualException::expectedValue() const
{
return m_expected;
}
std::string
NotEqualException::actualValue() const
{
return m_actual;
}
} // namespace CppUnit
MongoDB Logo MongoDB