Re: [Cppunit-devel] Re: [ cppunit-Bugs-464844 ] Comp. warnings & errors - rel 1.6.0
Brought to you by:
blep
From: Steve M. R. <ste...@vi...> - 2001-09-30 18:39:03
|
Hi, On Sun, Sep 30, 2001 at 12:54:47PM -0500, Stanley Sutton wrote: > I'm having the same problem on Solaris 8, with the Forte 6 update 1 compiler. OK. It seems likely that Baptiste's change will fix this particular problem. If you have the chance, you could apply the diff below or grab the CVS sources now or release 1.6.1 tomorrow and test them. We'd really like to know whether the problem goes away. > One subtle difference in the Forte 6 update 1 and later compilers is > that they are ISO complient, rather than ANSI complient. The > compiler/linker also has some mangling issues. I've attached the > readme for the update 1 compiler. So, even with the fix, is there a problem linking with CppUnit? -S Index: include/cppunit/extensions/HelperMacros.h =================================================================== RCS file: /cvsroot/cppunit/cppunit/include/cppunit/extensions/HelperMacros.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -b -B -r1.15 -r1.16 --- include/cppunit/extensions/HelperMacros.h 2001/09/23 06:09:15 1.15 +++ include/cppunit/extensions/HelperMacros.h 2001/09/30 14:44:18 1.16 @@ -101,6 +101,13 @@ #define CPPUNIT_TEST_SUITE( ATestCaseType ) \ private: \ typedef ATestCaseType __ThisTestCaseType; \ + class ThisTestCaseFactory : public CppUnit::TestFactory \ + { \ + virtual CppUnit::Test *makeTest() \ + { \ + return new ATestCaseType(); \ + } \ + }; \ public: \ static void \ registerTests( CppUnit::TestSuite *suite, \ @@ -174,15 +181,9 @@ ThisTestCaseFactory factory; \ __ThisTestCaseType::registerTests( builder.suite(), &factory ); \ return builder.takeSuite(); \ - } \ - private: \ - class ThisTestCaseFactory : public CppUnit::TestFactory \ - { \ - virtual CppUnit::Test *makeTest() \ - { \ - return new __ThisTestCaseType(); \ } \ - } + private: /* dummy typedef so that the macro can still end with ';'*/ \ + typedef ThisTestCaseFactory __ThisTestCaseFactory #define __CPPUNIT_CONCATENATE_DIRECT( s1, s2 ) s1##s2 #define __CPPUNIT_CONCATENATE( s1, s2 ) __CPPUNIT_CONCATENATE_DIRECT( s1, s2 ) -- by Rocket to the Moon, by Airplane to the Rocket, by Taxi to the Airport, by Frontdoor to the Taxi, by throwing back the blanket and laying down the legs ... - They Might Be Giants |