RE: [Cppunit-devel] TestSuiteBuilder & type info...
Brought to you by:
blep
|
From: Bastiaan B. <bas...@li...> - 2001-05-14 08:32:57
|
-----Oorspronkelijk bericht-----
Van: Baptiste Lepilleur [mailto:bl...@cl...]
Verzonden: Sunday, May 13, 2001 11:31 AM
Aan: Cpp Unit Develpment Mailing List
Onderwerp: [Cppunit-devel] TestSuiteBuilder & type info...
I finally managed to setup WinCvs and ssh. I checked out cppunit,
Congrats.
recompile, and link against TTR...
Horror, all RTTI have been removed from TestSuiteBuilder and TestSuite
!!!
Can somebody explains me why it has been done ?
That would be me :-)
(You can check that with ViewCVS at SF by browsing the logs).
- It breaks the interface published in release 1.5.5
No, it breaks the interface published in CppUnitW 1.2. The change already
had been made before the release of 1.5.5. I don't know whether that
increases or decreases your horror.
I'm sorry if I haven't made clear that I made these changes in preparation
of the 1.5.5 release. Now that you've got CVS working, missing updates
should be less likely.
- RTTI makes it easy to extract the name from template test case, which
is very difficult to do otherwise.
Whether you need RTTI depends on how/where you the need the name. For
example if you use your CU_TEST_SUITE HelperMacro, the Fixture name is
already available as the macro parameter.
- Portability is not an issue (though it should be document since you
would expect g++ to have a proper support for RTTI). Lots of people develops
for one platform only.
Portability is an issue: CppUnit is intented to be a cross platform library,
so the core feature set should be identical everywhere. Also the development
of CppUnit becomes messy if platform dependent code is scattered across core
classes. That's why I did not want RTTI stuff in TestSuite.
The #ifdefs I put in where a non-elegant temporary solution, which did not
solve the development problem.
Since the actual RTTI code inside TestSuite is trivial, it may as be done
byt the caller, outside the TestSuite class. Likewise the TestSuiteBuilder
seems useful too if you don't have RTTI, so I removed it there too;
especially since the HelperMacros do not actually need the RTTI support.
For an RTTI supporting TestSuiteBuilder, I suggest subclassing it to add the
RTTI based constructor.
In any case the TestSuiteBuilder is a smaller issue because it's not a core
class, and it's only a header file: no RTTI dependent code would have been
compiled in the CppUnit library either way.
That leaves the TestFactoryRegistry class, which still has the USE_TYPEINFO
#ifdef. I like to solve the issue somehow there too, before 1.5.6.
Suggestions are welcome!
BTW, g++ isn't broken, the C++ standard is, because it does not specify
exactly what type_info::name() should return. The g++ people have simply
made a (for this purpose) not so useful choice of returning the mangled
name.
In fact, the next release of MSVC++ may return something completely
different from the current release as well. The underspecification of the
name() method, makes me suspicious of using it.
Bastiaan
Baptiste.
---
Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/index.html
Author of The Text Reformatter, a tool for fanfiction readers and writers.
Language: English, French (Well, I'm French).
_______________________________________________
Cppunit-devel mailing list
Cpp...@li...
http://lists.sourceforge.net/lists/listinfo/cppunit-devel
|