[Cppunit-devel] In fact ...
Brought to you by:
blep
From: <nic...@ya...> - 2004-06-22 15:50:05
|
It appears to do this with all dll project. In fact, I followed the steps to create a very simple plug-in base on "group___writing_test_plug_in.html" ------- Creating a test plug-in is really simple: * make your project a dynamic library (with VC++, choose Win32 Dynamic Library in the project wizard), and link against the dynamic library version of CppUnit (cppunit*_dll.lib for VC++). * in a cpp file, include TestPlugIn.h, and use the macro CPPUNIT_PLUGIN_IMPLEMENT() to declare the test plug-in. * That's it, you're done! All the tests registered using the TestFactoryRegistry, CPPUNIT_TEST_SUITE_NAMED_REGISTRATION, or CPPUNIT_TEST_SUITE_REGISTRATION will be visible to other plug-in and to the DllPlugInRunner. ------- The dll load, but as soon as I add ExampleTestCase.cpp/.h, to the project, it failed. the error is : "Failed to load dynamic library: Debug/testdll.dll-hotrunner. The specific procedure could not be found" Any idea? I'll try to find, but I'm new in programming :-) Nic --- Nicolas Gendron <nic...@ya...> a écrit : > Hi, > > I just want to warn you, this message is about an > "ugly" procedure to have a MFC test runner to test a > CONSOLE application ;-P > > It was a king of exercice I did for fun. But when > repeating it with 1.10.2, I get an error. > > Here is how this is done: > > I had a new configuration to the project. Add > CPPUNIT_DLL, RTTI, cppunitd_dll.lib. > > I also add /DLL and check "Doesn't produce .LIB" and > change the name of the ouput file from .exe to .dll > > (dit I said Ugly? lolol) > > In the project I add PlugIn.dll which only have > CPPUNIT_PLUGIN_IMPLEMENT() in it. > > With 1.9.14, I'm able to load the dll and run tests > ! > héhé. (ugly but working) > > With 1.10.2, the plug in is loaded if there is no > test > suite registered, but as soon as I put a testsuite, > the dll failed loading. > > Can anybody have an idea why it do this? > Or is anybody have a better solution to make test of > a > CONSOLE project with MFC testrunner and without > addin > a new mfc project to workspace with the same files. > (i.e just in writing a new configuration) > > Thanks a lot. > Nic > > > > > > > Créez gratuitement votre Yahoo! Mail avec 100 Mo de > stockage ! > Créez votre Yahoo! Mail sur > http://fr.benefits.yahoo.com/ > > Dialoguez en direct avec vos amis grâce à Yahoo! > Messenger !Téléchargez Yahoo! Messenger sur > http://fr.messenger.yahoo.com > > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & > Training. > Attend Black Hat Briefings & Training, Las Vegas > July 24-29 - > digital self defense, top technical experts, no > vendor pitches, > unmatched networking opportunities. Visit > www.blackhat.com > _______________________________________________ > Cppunit-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppunit-devel > Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com |