Menu

CppUnitTestApp: Exception assignment fails!

Help
2002-03-08
2002-03-08
  • Wolfgang Stoecher

    When trying the unit tests for cppunit itself one test fails in my installation (v 1.6.2, VC++ 6.0, Win2000):
    ExceptionTest::testAssignment()

    It seems that Exception::operator=() changes the virtual function table to the base class (std::exception) and so calling what() on other returns "Unknown Exception".

    What is going wrong?

    thank you,

    Wolfgang

     
    • Wolfgang Stoecher

      btw: I just found out that commenting out the call to the base class resolves the problem for me. But still: what is going on?

      thank you,
      Wolfgang
      --------------
      Exception::operator=( const Exception& other )
      {
      //  SuperClass::operator= (other);
      ...
      this code works!

       
    • Feng Ye

      Feng Ye - 2002-03-08

      You can check the old post:

      CPPUnitTestApp Win32 (v1.6.2)

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.