[Cppunit-devel] CppUnitW 1.2 merge
Brought to you by:
blep
From: Bastiaan B. <bas...@li...> - 2001-04-29 15:08:16
|
Hi Baptiste (and everyone else), I've merged most of CppUnitW 1.2, with some exceptions: * TestFactoryRegistry used auto_ptr. I had to change that to ordinary pointers: auto_ptr's cannot be used inside STL containers (see for example: http://gcc.gnu.org/onlinedocs/libstdc++/20_util/howto.html ). With MSVC++ it may work (by accident), but with g++ is doesn't even compile. For now, I've only changed pointer types and not done anything about the memory management: very likely it will leak now. Please have a look at it. * I've put the typeinfo stuff in TestSuite and TestFactoryRegistry inside "#ifdef USE_TYPEINFO ". RTTI is still rather new and may not be supported properly on all platforms. Since it's only used to create TestSuites with names direved from a class name, I did not not feel dependence of the core library on RTTI was justified. Also deriving the class name through type_info is an unreliable method. Once again the C++ comittee managed to kill a useful feature: not only may the string returned by type_info.name() differ from compiler to compiler (e.g. g++ returns some really ugly mangled name), but differ with different runs of the program as well. Of course this renders the whole method useful. If someone can explain why the comittee has done this, please do! * Changed TestSuite.getTests() to return a const ref. * Moved TestFactoryRegistry.cpp from src/cppunit/extensions to src/cppunit. It is part of the main library anyway and is much easier to configure automake for it. Please give it a try and let me know where I messed up. Thanks, Bastiaan |