/[escript]/trunk/esysUtils/test/EsysExceptionTestCase.cpp
ViewVC logotype

Diff of /trunk/esysUtils/test/EsysExceptionTestCase.cpp

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

revision 1454 by trankine, Fri Jan 11 07:45:58 2008 UTC revision 1455 by phornby, Thu Feb 28 17:19:44 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 {
      public:  
26    
27      /// Default Constructor for Exception     typedef EsysException Parent;
     DerivedEx() : EsysException() {}  
28    
29      /// Constructor for Exception  public:
     DerivedEx(const char *cstr) : EsysException(cstr) {}  
30    
31      /// Constructor for Exception     /// Default Constructor for Exception
32      DerivedEx(const string &str) : EsysException(str) {}     DerivedEx() : Parent() { updateMessage(); }
33    
34      /// Return the exception name     /// Constructor for Exception
35      virtual string exceptionName() const {     DerivedEx(const char *cstr) : Parent(cstr) { updateMessage(); }
36          return "DerivedException";  
37      }     /// Constructor for Exception
38       DerivedEx(const string &str) : Parent(str) { updateMessage(); }
39    
40       // Copy Constructor.
41       DerivedEx(const DerivedEx &other): Parent(other) { updateMessage(); }
42    
43       /// Return the exception name
44       virtual const string & exceptionName() const
45          {
46             return rhubarb;
47          }
48            
49       static const string rhubarb;
50  };  };
51    
52  void EsysExceptionTestCase::testCase0() {  const string DerivedEx::rhubarb("DerivedException");
53    
54      //  void EsysExceptionTestCase::testCase0() {
     // dummy test case  
     //  
     // just test the UnitTesting framework is OK  
     //  
55    
56      assert(true);      assert(true);
57    

Legend:
Removed from v.1454  
changed lines
  Added in v.1455

  ViewVC Help
Powered by ViewVC 1.1.26