RE: [Cppunit-devel] Duplicated #includes
Brought to you by:
blep
From: Summerwill, B. <BSu...@eu...> - 2001-09-25 13:30:49
|
Baptiste wrote ... >> Shoudln't that <string> only be included if you don't have >> CPPUNIT_HAVE_SSTREAM anyway ? I'm not sure. Presumably it's there so that the inline implementation of OStringStream::str() can construct the msg local variable, in which case you are probably correct. >> Wouldn't it be better to move the declaration of OStringStream in >> its one header (include/cppunit/portability, include/cppunit/tools ?), >> and includes it only where it is used ? Yes! Looks like it's only used in assertion_traits<T>::toString() and in TestFactoryRegistry::registerFactory(), so that would be sensible. The new header file would then #include Portability.h, for its pre-processor defines. If that's done, then the duplicated includes information I sent would no longer be valid, but the solution would be better, I think. Cheers, Bob -----Original Message----- From: Baptiste Lepilleur [mailto:gai...@fr...] Sent: 25 September 2001 14:06 To: Cpp Unit Develpment Mailing List Subject: Re: [Cppunit-devel] Duplicated #includes Quoting "Summerwill, Bob" <BSu...@eu...>: > > I've just had a quick scan through CppUnit 1.6.0, and found these > duplicated > #includes. The <string> ones are due to addition of a <string> #include > in > Portability.h, making the other ones unnecessary. Shoudln't that <string> only be included if you don't have CPPUNIT_HAVE_SSTREAM anyway ? Wouldn't it be better to move the declaration of OStringStream in its one header (include/cppunit/portability, include/cppunit/tools ?), and includes it only where it is used ? Baptiste. > Source file Duplicated include > ----------- ------------------ > extensions/HelperMacros.h string > extensions/TestFactoryRegistry.h string > extensions/TestSuiteBuilder.h > cppunit/extensions/TypeInfoHelper.h > TestAssert.h string > TestCase.cpp cppunit/Exception.h > TestCase.h string > TestSuite.h string > TypeInfoHelper.cpp string > > > > Cheers, > Bob > > _______________________________________________ > Cppunit-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppunit-devel > --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/index.html Language: English, French _______________________________________________ Cppunit-devel mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppunit-devel |