[Cppunit-devel] About cppunit's virtual function in TestCase class
Brought to you by:
blep
|
From: <lu...@ss...> - 2006-02-24 07:59:10
|
Dear all
I am a new user of the cppunit, thanks for all of your works.
I have some comment in the TestCase class, if there are some
things I have not thinked, plz help me to know it.
Why don't we use private pure virtual member function instead
of the public pure virtual member runTest();
use
public:
void runTest() {
doRunTest();
}
private:
virtual void doRuntTest()=0;
instead of
public:
virtual void runTest()=0;
this can avoid the subclass of subclass from forgeting to overwrite
the function and get the same meaning of the public virtual member function
I think it may be a better implementation in such overwriting problem
But I don't know is there any problems I ignore?
Best Regards,
Luba
|