Re: [Cppunit-devel] Re: [ cppunit-Bugs-464844 ] Comp. warnings & errors - rel 1.6.0
Brought to you by:
blep
From: Baptiste L. <bl...@cl...> - 2001-09-30 14:44:10
|
[...] > > "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? I don't remember the rules. I'm sure I read something about it somewhere. An alternative would be to move the nested class declaration to CPPUNIT_TEST_SUITE where the type is explicit available as a macro parameter. In fact I just did that (comitted). > > -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 > > > _______________________________________________ > Cppunit-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppunit-devel > |