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 -----=20
From: Cremin, Patrick=20
To: 'cpp...@li...'=20
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=3D908942 says the =
below is an option:
=20
>Have your librairies publishing an=20
>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".
|