/[escript]/branches/windows_from_1431_trunk/esysUtils/test/EsysExceptionTestCase.cpp
ViewVC logotype

Diff of /branches/windows_from_1431_trunk/esysUtils/test/EsysExceptionTestCase.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1447 by trankine, Thu Feb 28 09:42:55 2008 UTC revision 1448 by phornby, Thu Feb 28 12:31:04 2008 UTC
# Line 23  using namespace CppUnitTest; Line 23  using namespace CppUnitTest;
23  using namespace esysUtils;  using namespace esysUtils;
24    
25  class DerivedEx : public EsysException {  class DerivedEx : public EsysException {
26    
27       typedef EsysException Parent;
28    
29  public:  public:
30    
31     /// Default Constructor for Exception     /// Default Constructor for Exception
32     DerivedEx() : EsysException() { updateMessage(); }     DerivedEx() : Parent() { updateMessage(); }
33    
34     /// Constructor for Exception     /// Constructor for Exception
35     DerivedEx(const char *cstr) : EsysException(cstr) { updateMessage(); }     DerivedEx(const char *cstr) : Parent(cstr) { updateMessage(); }
36    
37     /// Constructor for Exception     /// Constructor for Exception
38     DerivedEx(const string &str) : EsysException(str) { updateMessage(); }     DerivedEx(const string &str) : Parent(str) { updateMessage(); }
39    
40     // Copy Constructor.     // Copy Constructor.
41     //DerivedEx(const EsysException &other): EsysException(other) {}     DerivedEx(const DerivedEx &other): Parent(other) { updateMessage(); }
42    
43     /// Return the exception name     /// Return the exception name
44     virtual const string & exceptionName() const     virtual const string & exceptionName() const
# Line 168  void EsysExceptionTestCase::testCase2() Line 171  void EsysExceptionTestCase::testCase2()
171      //      //
172      DerivedEx copyEx(ex1);      DerivedEx copyEx(ex1);
173      string copyString = copyEx.toString();      string copyString = copyEx.toString();
         std::cout << "\n==============================\n"  
                   << ex1String << std::endl  
                   << copyString << std::endl  
                   << "==============================\n";  
174      assert(ex1String == copyString);      assert(ex1String == copyString);
175    
176      //      //

Legend:
Removed from v.1447  
changed lines
  Added in v.1448

  ViewVC Help
Powered by ViewVC 1.1.26