[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 07:46:40
|
On Fri, Sep 28, 2001 at 12:54:36AM -0700, no...@so... wrote: > Bugs item #464844, was opened at 2001-09-25 08:25 > You can respond by visiting: > http://sourceforge.net/tracker/?func=detail&atid=111795&aid=464844&group_id=11795 > Initial Comment: > I downloaded release 1.6.0 on a unix machine with > > SunOS 5.6 and played a little with it. > > > > As long as I did not change the default compiler and > > flags, everything worked fine. > > > > But then I switched to Forte' 6 Upd.1 compiler and I > > got some warnings for the generation of the cppunit > > shared lib and errors when compiling the unit tests. > > > > Hereafter what I did and what I got: > > > > ./configure CXX=CC CXXFLAGS=-g --enable-static=no > > > > make > > > > ... > > CC -DHAVE_CONFIG_H -I. -I. -I../../config - > > I../../include -I../../include -g -c > > RepeatedTest.cpp -KPIC -DPIC -o .libs/RepeatedTest.o > > "../../include/cppunit/extensions/RepeatedTest.h", > > line 33: Warning: > > CppUnit::RepeatedTest::countTestCases hides the > > virtual function CppUnit::TestDecorator::countTestCases > > () const. > > "../../include/cppunit/extensions/RepeatedTest.h", > > line 33: Warning: CppUnit::RepeatedTest::toString > > hides the virtual function > > CppUnit::TestDecorator::toString() const. > > 2 Warning(s) detected. Thanks. I'll fix these for the next release. > make check > > > > ... > > Making check in cppunittest > > make cppunittestmain > > source='BaseTestCase.cpp' object='BaseTestCase.o' > > libtool=no \ > > depfile='.deps/BaseTestCase.Po' > > tmpdepfile='.deps/BaseTestCase.TPo' \ > > depmode=none /bin/sh ../../config/depcomp \ > > CC -DHAVE_CONFIG_H -I. -I. -I../../config - > > I../../include -I../../include -g -c -o > > BaseTestCase.o `test -f BaseTestCase.cpp || > > echo './'`BaseTestCase.cpp > > "BaseTestCase.h", line 11: Error: > > BaseTestCase::__ThisTestCaseType is not accessible > > from BaseTestCase::ThisTestCaseFactory::makeTest(). > > 1 Error(s) detected. __ThisTestCaseType is a typedef, defined using the macro CPPUNIT_TEST_SUITE. It is private to class BaseTestCase. So what is the rule of access to private members for a nested class? All the compilers other than Forte seem to allow such access. Would adding friend class ThisTestCaseFactory; to the end of the macro CPPUNIT_TEST_SUITE_END (in include/cppunit/extensions/HelperMacros.h) solve the problem? -S -- 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 |