Re: TestFactoryRegistry

"Baptiste Lepilleur" <[email protected]> Tue, 4 Feb 2003 10:25:00 +0100
Newsgroups gmane.comp.lib.cppunit.devel
Message-ID <001101c2cc2f$4c05e860$63c0c3d4@lain>
This issue is easily solved by using CppUnit DLL instead of the static library. Also, if you go the other way (explicitely exporting the test factory), you only need to do that once per library. Thoses headers never change, so you don't have any compilations bottleneck.

Baptiste.
  ----- Original Message ----- 
  From: Cremin, Patrick 
  To: '[email protected]' 
  Sent: Tuesday, February 04, 2003 1:20 AM
  Subject: [Cppunit-devel] TestFactoryRegistry




  <I am using MS .NET>



  My problem is that I have a "UnitTest" project that contains the main() to run the unit test from all other projects in the solution. The other projects use CPPUNIT_TEST_SUITE_REGISTRATION() to register their suites.



            Once the libraries from the other projects are created the TestFactoryRegistry is lost, and I cannot use it in my UnitTest main().



            The post http://sourceforge.net/mailarchive/message.php?msg_id=908942 says the below is an option:

            

  >Have your librairies publishing an 

  >interface that provide an access to their TestFactoryRegistry.



  >For example, in suite1.lib project, you add:



  >TestFactoryRegistry &getSuite1Registry() {

  >        return TestFactoryRegistry::getRegistry();

  >}





  This would work, but would involve me having to include a ton of header files in my main. One of the stated purposes of having the TestFactoryRegistry is to remove the "compilation bottleneck caused by the inclusion of all test case headers".