RE: [Cppunit-devel] writing abstract test class
Brought to you by:
blep
From: Moran Ben-D. <mbe...@ii...> - 2002-07-31 13:44:19
|
Since there isn't reflection in C++.. i can't see a way around the AUTOMATICALLY point.. However, with respect to the having a hierarchy of test classes.. you should declare the cppunit stuff in your concrete class.. you could have your base class inherit from TestFixture but use the CPPUNIT_* declaration macros in your concrete class. moran -----Original Message----- From: Bogaerts Marc [mailto:MB...@fa...] Sent: Wednesday, July 31, 2002 4:25 AM To: cpp...@li... Subject: [Cppunit-devel] writing abstract test class I've been looking for a Unit Test Framework for C++, since I've had good experiences with JUnit in Java. That's how I got to CppUnit and tried it. Because I'm not used to C++ I had some difficulties using it. Being used to JUnit there are some things I miss in CppUnit, but maybe they do exist, just that I cannot find them in the doc. * being able to build a suite that AUTOMATICALLY includes all test functions i.e. functions whose name start with 'test'. * being able to create a hierarchy of test classes, some of which may be abstract, and execute all tests in concrete classes. This gives me errors at compile time, because the helper macro CPPUNIT_TEST_SUITE tries to instantiate an object of the test class, but this class is abstract and thus cannot be instantiated. I was wondering if you might have a solution for these problems, or if you would think of providing such features in the future? Thanks. Marc. ---------------------------------------------------------------------------- Marc Bogaerts - Software Engineer Phone : +32 (0)2 370.36.37 - e-mail : mb...@fa... ---------------------------------------------------------------------------- S.A. FABRICOM N.V. Rue Gatti de Gamond, 254 - B-1180 Bruxelles - Belgium General Phone : +32 (0)2 370.33.35 - Fax : +32 (0)2 370.32.22 ---------------------------------------------------------------------------- The information contained in this e-mail is intended only for the person or entity to which it is addressed and may contain confidential and / or privileged material. If you are not the intended recipient of this e-mail, the use of this information or any disclosure, copying or distribution is prohibited and may be unlawful. If you received this in error, please contact the sender and delete the material from any computer. This electronic transmission is intended exclusively for the person to whom it is addressed and may contain privileged and confidential material. Any disclosure, copying, distribution or other action based upon the information by persons other than the intended recipient is prohibited. If you receive this message in error, please contact the sender and delete the material. Our company does not warrant a proper and complete transmission of this information, nor does it accept liability for any delays. |