[Cppunit-devel] error about AutoRegisterRegistry
Brought to you by:
blep
From: CppUnit d. m. l. <cpp...@li...> - 2007-01-16 07:23:12
|
Hi I have complied the CppUnit project and example project successfully, and got the *TestPlugInRunner(d).exe*, *CppUnitTestPlugIn(d).dll* and * simple_plugin(d).dll*. But when I use TestPlugInRunner.exe loading CppUnitTestPlugIn.dll first then load simple_plugin.dll, after that click the Browse button, in the Test hierarchy dialog's tree view, there is still the CppUnitTestPlugIn.dll 's sub-registry test suites, Core, Extensions, Helpers, Output, Tools and UnitTestTool, remained even containing nothing. I have browsed part of the source code, and found that in the CppUnitTestSuite.cpp, it uses macro *CPPUNIT_TEST_SUITE_NAMED_REGISTRATION** (ATestFixtureType, suiteName)** (cppunit-1.12.0\include\cppunit\extensions\ HelperMacros.h)* and *CPPUNIT_REGISTRY_ADD_TO_DEFAULT(which)** ( cppunit-1.12.0\include\cppunit\extensions\ HelperMacros.h),* which in turn using *CPPUNIT_NS::AutoRegisterRegistry** **( cppunit-1.12.0\include\cppunit\extensions\* *AutoRegisterSuite.h)*, to implement the test suites' hierarchy. But when the dll is unload, there seems no destroy of those sub-registries. So if other dll loaded, the remaining registries will also be displayed with no test. I wonder if there is some place in the source code do the registry cleaning job when a new dll is loaded. Thanks in advance. Amo |