#192 TestDecorator does assume ownership!

1.12.0
open
2
2013-12-18
2008-10-21
Niels Dekker
No

According to the documentation, TestDecorator "does not assume ownership of the test it decorates":
http://cppunit.cvs.sourceforge.net/viewvc/cppunit/cppunit/include/cppunit/extensions/TestDecorator.h?revision=1.10

But TestDecorator does actually take ownership! Its destructor deletes test it has decorated:
http://cppunit.cvs.sourceforge.net/viewvc/cppunit/cppunit/src/cppunit/TestDecorator.cpp?revision=1.2

So I'd suggest to just update the documentation, according to the attached patch. Otherwise TestDecorator would have been a little bit too much like the TestReference class I've just proposed, at the Help forum :-) Please have a look:
http://sourceforge.net/forum/forum.php?thread_id=1880533&forum_id=37108

Discussion

  • Niels Dekker
    Niels Dekker
    2008-10-21

    A patch for the documentation of TestDecorator

     
    Attachments
  • Niels Dekker
    Niels Dekker
    2008-10-21

    • priority: 5 --> 2
    • assigned_to: nobody --> blep