cppunit-devel Mailing List for CppUnit - C++ port of JUnit (Page 34)
Brought to you by:
blep
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
(21) |
May
(96) |
Jun
(109) |
Jul
(42) |
Aug
(6) |
Sep
(106) |
Oct
(60) |
Nov
(20) |
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(7) |
Feb
(11) |
Mar
(49) |
Apr
(124) |
May
(30) |
Jun
(37) |
Jul
(53) |
Aug
(33) |
Sep
(21) |
Oct
(22) |
Nov
(19) |
Dec
(15) |
2003 |
Jan
(34) |
Feb
(25) |
Mar
(11) |
Apr
(12) |
May
(16) |
Jun
(24) |
Jul
(23) |
Aug
(23) |
Sep
(42) |
Oct
(7) |
Nov
(32) |
Dec
(33) |
2004 |
Jan
(41) |
Feb
(41) |
Mar
(24) |
Apr
(25) |
May
(18) |
Jun
(13) |
Jul
(11) |
Aug
(15) |
Sep
(22) |
Oct
(10) |
Nov
(15) |
Dec
(9) |
2005 |
Jan
(4) |
Feb
(15) |
Mar
(11) |
Apr
(16) |
May
(29) |
Jun
(17) |
Jul
(27) |
Aug
(12) |
Sep
(9) |
Oct
(10) |
Nov
(5) |
Dec
(6) |
2006 |
Jan
(2) |
Feb
(6) |
Mar
(7) |
Apr
(2) |
May
(1) |
Jun
(5) |
Jul
(8) |
Aug
(6) |
Sep
(10) |
Oct
(11) |
Nov
(15) |
Dec
(2) |
2007 |
Jan
(12) |
Feb
(22) |
Mar
(10) |
Apr
(7) |
May
(1) |
Jun
(8) |
Jul
(4) |
Aug
(1) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
|
2008 |
Jan
|
Feb
(7) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(7) |
Dec
|
2010 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Baptiste L. <gai...@fr...> - 2002-07-10 18:48:16
|
I do both, though I mostly use Debug build (when failure cause is not obvious, I use the debugger to quickly pin-point the cause). Still, I regularly run the tests in a Release build. This helps spot problems that might result from compiler optimizations, and the 'release' memory model. Baptiste. ----- Original Message ----- From: "John Lam" <jl...@iu...> To: <cpp...@li...> Sent: Monday, June 24, 2002 6:24 AM Subject: [Cppunit-devel] Debug vs. release builds of CppUnit Do most folks run their unit tests using release build settings or debug build settings? Just curious ... Cheers, -John http://www.iunknown.com ------------------------------------------------------- Sponsored by: ThinkGeek at http://www.ThinkGeek.com/ _______________________________________________ Cppunit-devel mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppunit-devel |
From: Baptiste L. <gai...@fr...> - 2002-07-10 18:48:14
|
standard way to handle test dataCould you explain shortly what is that = TextContext class ?=20 Recently, I was thinking about passing the TestResult to the setUp() and = tearDown() methods. I can be done without too much trouble, but I still = haven't come up with some really good reason (might change though). Baptiste. ----- Original Message -----=20 From: Moran Ben-David=20 To: 'cpp...@li...'=20 Sent: Sunday, July 07, 2002 4:07 AM Subject: [Cppunit-devel] standard way to handle test data Hi.=20 I'm looking for a standard way for making my TestFixtures data driven. = I've read some suggestions about a TextContext class and seen JTestCase = (http://jtestcase.sourceforge.net/).. Rather than write my own = implemention of one or more of these concepts for CppUnit, I'd rather = use a popular implemention. Is there one? Thanks,=20 Moran=20 ---------------------|||| ii3 |=20 Moran Ben-David=20 ii3 Inc.=20 t) 416.595.5232 x294=20 f) 416.595.5224=20 e) mbe...@ii...=20 i) <http://www.ii3.com/>=20 --------------- eBusiness. Your Vision Here.=20 |
From: Baptiste L. <gai...@fr...> - 2002-07-10 18:48:12
|
I do agree. This is a legacy of the original version of CppUnit, but I doubt it was ever really used. Can someone provide any good reason why TestDecorator should not destroy the test that is passed at construction ? Notes that this also impact TestSetUp and RepeatedTest as they inherits TestDecorator... Baptiste. ----- Original Message ----- From: "FUKUDA Fumiki" <ff...@nt...> To: <cpp...@li...> Sent: Wednesday, July 03, 2002 11:38 AM Subject: [Cppunit-devel] ~TestDecorator() does NOT delete test > Hi, > > I found a questionable code. > > TestDecorator::~TestDecorator() does NOT delete decorated Test* > I think it will lead memory-leak or memory-run-up... > > -----:-----:-----:-----:-----:-----:-----:-----:-----:----- > FUKUDA (episteme) Fumiki -- magical, but never a magic... |
From: Pedro F. <ped...@in...> - 2002-07-09 09:18:44
|
Hi Diego, > Building your GREAT CppUnit with "VC6 Standard Edition" in > Win98 show two linking errors, with "VC6 Profesional Edition" > in Win2k not. > > > > --------------------Configuration: TestRunner - Win32 Release > Unicode-------------------- > > Linking... > LINK : fatal error LNK1104: cannot open file "mfc42u.lib" > Error executing link.exe. > > testrunneru.dll - 1 error(s), 0 warning(s) > --------------------Configuration: TestRunner - Win32 Debug > Unicode-------------------- > > Linking... > LINK : fatal error LNK1104: cannot open file "mfc42ud.lib" > Error executing link.exe. > > testrunnerud.dll - 1 error(s), 0 warning(s) Do you have Unicode support for VC installed? HTH, Pedro |
From: Diego A. y T. <ala...@ho...> - 2002-07-08 06:09:36
|
Hello, Building your GREAT CppUnit with "VC6 Standard Edition" in Win98 show two linking errors, with "VC6 Profesional Edition" in Win2k not. --------------------Configuration: TestRunner - Win32 Release Unicode-------------------- Linking... LINK : fatal error LNK1104: cannot open file "mfc42u.lib" Error executing link.exe. testrunneru.dll - 1 error(s), 0 warning(s) --------------------Configuration: TestRunner - Win32 Debug Unicode-------------------- Linking... LINK : fatal error LNK1104: cannot open file "mfc42ud.lib" Error executing link.exe. testrunnerud.dll - 1 error(s), 0 warning(s) _________________________________________________________________ MSN. Más Útil cada Día. http://www.msn.es/intmap/ |
From: Moran Ben-D. <mbe...@ii...> - 2002-07-07 02:07:40
|
Hi. I'm looking for a standard way for making my TestFixtures data driven. I've read some suggestions about a TextContext class and seen JTestCase (http://jtestcase.sourceforge.net/).. Rather than write my own implemention of one or more of these concepts for CppUnit, I'd rather use a popular implemention. Is there one? Thanks, Moran ---------------------|||| ii3 | Moran Ben-David ii3 Inc. t) 416.595.5232 x294 f) 416.595.5224 e) mbe...@ii... i) <http://www.ii3.com/> --------------- eBusiness. Your Vision Here. |
From: FUKUDA F. <ff...@nt...> - 2002-07-03 09:39:14
|
Hi, I found a questionable code. TestDecorator::~TestDecorator() does NOT delete decorated Test* I think it will lead memory-leak or memory-run-up... -----:-----:-----:-----:-----:-----:-----:-----:-----:----- FUKUDA (episteme) Fumiki -- magical, but never a magic... |
From: Baptiste L. <gai...@fr...> - 2002-06-29 06:40:27
|
Thanks. I fixed both. Baptiste. ----- Original Message ----- From: <wil...@us...> To: "CppUnit Development Mailing List" <cpp...@li...> Sent: Thursday, June 27, 2002 6:02 AM Subject: [Cppunit-devel] 1.9.8 compiler (esp BCB5) issues > > > Using the 1.9.8 snapshot, I've been working on towards Borland C++ Builder 5 > DLLs. I finally have the library options correct enough that nothing blows up > -- although I'm still working on TestRunner that'll work in my GUI environment. > During my work though, I discovered the following: > > 1. I think PlugInManager.cpp is missing a > #if !defined(CPPUNIT_NO_TESTPLUGIN) > #endif > section to match what is in the PlugInManager.h file. > > 2. XmlDocument::setEncoding generates a "Two operands must evaluate to the same > type" compiler error unless "ISO..." is wrapped like > std::string( "ISO-8859-1" ) > > > > > ------------------------------------------------------- > Sponsored by: > ThinkGeek at http://www.ThinkGeek.com/ > _______________________________________________ > Cppunit-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppunit-devel > |
From: Pedro F. <ped...@in...> - 2002-06-28 15:34:56
|
> > > I have 20 projects compiled with /MTd (Multi-threaded > debug) CppUnit > > > uses /MDd (Multi-threaded Debug DLL). > > > > > > Because we are using VC7.0, we'd rather compile with /MTd > instead of > > > /MDd, however if I recompile CppUnit with the /MTd flags it fails > > > miserably when executing a unit test through the > > > DllPluginTest_DLL.exe program. > > > > Shooting from the hip: > > > > - Have you tried DllPluginTest.exe instead of > > DllPluginTest_DLL.exe? > > - Aren't you using DllPluginTest(_DLL).exe to run > > Debug version > > tests? > > > > I haven't tried the DllPluginTest.exe, does it initialize > something differently ? For me, it only works with the DLL runtime, but I'll leave the details to anyone more acquainted with the matter. > Anyway, the problem with /MT is at compile time. I get > numerous errors regarding std::exception and std::string > requiring a __declspec(dllimport) or something similar. Then > when I test a DLL compiled under /MTd (CppUnit also compiled > under /MTd) it crash and burns with an assert error whenever > I have a message with more then 15 characters in a > CPPUNIT_ASSERT_MESSAGE. It is strange behavior to say the least :) Yup. No more bullets, sorry. Pedro |
From: Philippe L. <phi...@ca...> - 2002-06-28 15:28:53
|
> -----Original Message----- > From: Pedro Ferreira [mailto:ped...@in...] >=20 > > I have 20 projects compiled with /MTd (Multi-threaded debug) > > CppUnit uses /MDd (Multi-threaded Debug DLL). > > > > Because we are using VC7.0, we'd rather compile with /MTd > > instead of /MDd, however if I recompile CppUnit with the /MTd > > flags it fails miserably when executing a unit test through > > the DllPluginTest_DLL.exe program. >=20 > Shooting from the hip: >=20 > - Have you tried DllPluginTest.exe instead of > DllPluginTest_DLL.exe? > - Aren't you using DllPluginTest(_DLL).exe to run=20 > Debug version > tests? >=20 I haven't tried the DllPluginTest.exe, does it initialize something = differently ? Anyway, the problem with /MT is at compile time. I get numerous errors = regarding std::exception and std::string requiring a = __declspec(dllimport) or something similar. Then when I test a DLL = compiled under /MTd (CppUnit also compiled under /MTd) it crash and = burns with an assert error whenever I have a message with more then 15 = characters in a CPPUNIT_ASSERT_MESSAGE. It is strange behavior to say = the least :) Phil |
From: Pedro F. <ped...@in...> - 2002-06-28 09:10:40
|
> I have 20 projects compiled with /MTd (Multi-threaded debug) > CppUnit uses /MDd (Multi-threaded Debug DLL). > > Because we are using VC7.0, we'd rather compile with /MTd > instead of /MDd, however if I recompile CppUnit with the /MTd > flags it fails miserably when executing a unit test through > the DllPluginTest_DLL.exe program. Shooting from the hip: - Have you tried DllPluginTest.exe instead of DllPluginTest_DLL.exe? - Aren't you using DllPluginTest(_DLL).exe to run Debug version tests? HTH, Pedro _____________________________________________________ Pedro Alves Ferreira INESC Porto http://www.inescporto.pt Pc da Republica, 93 R/C Tel: +351 22 209 42 23 4050-497 PORTO Fax: +351 22 208 41 72 Portugal mailto:ped...@in... |
From: Philippe L. <phi...@ca...> - 2002-06-27 22:48:05
|
I have 20 projects compiled with /MTd (Multi-threaded debug) CppUnit = uses /MDd (Multi-threaded Debug DLL). Because we are using VC7.0, we'd rather compile with /MTd instead of = /MDd, however if I recompile CppUnit with the /MTd flags it fails = miserably when executing a unit test through the DllPluginTest_DLL.exe = program. If you have encountered a similar problem, please help. Phil |
From: <wil...@us...> - 2002-06-27 13:01:45
|
Using the 1.9.8 snapshot, I've been working on towards Borland C++ Builder 5 DLLs. I finally have the library options correct enough that nothing blows up -- although I'm still working on TestRunner that'll work in my GUI environment. During my work though, I discovered the following: 1. I think PlugInManager.cpp is missing a #if !defined(CPPUNIT_NO_TESTPLUGIN) #endif section to match what is in the PlugInManager.h file. 2. XmlDocument::setEncoding generates a "Two operands must evaluate to the same type" compiler error unless "ISO..." is wrapped like std::string( "ISO-8859-1" ) |
From: John L. <jl...@iu...> - 2002-06-24 04:24:01
|
Do most folks run their unit tests using release build settings or debug build settings? Just curious ... Cheers, -John http://www.iunknown.com |
From: John L. <jl...@iu...> - 2002-06-21 20:57:07
|
If my setUp() or tearDown() methods fail, I would like to have something more specific than "setUp() failed ..." showing up in my logs. I'd like to propose the following change to TestCase.cpp: It currently reads: try { setUp(); try { runTest(); } catch ( Exception &e ) { Exception *copy =3D e.clone(); result->addFailure( this, copy ); } catch ( std::exception &e ) { result->addError( this, new Exception( e.what() ) ); } catch (...) { Exception *e =3D new Exception( "caught unknown exception" ); result->addError( this, e ); } try { tearDown(); } catch (...) { result->addError( this, new Exception( "tearDown() failed" ) ); } } catch (...) { result->addError( this, new Exception( "setUp() failed" ) ); } I would like to add: catch ( const Exception &e ) { Exception *copy =3D e.clone(); result->addError( this, copy ); } to the outer most try block so that I can get more meaningful output when errors occur.=20 Similarly, I would like to add the same code to the try block that guards the call to tearDown(). Does this sound reasonable to the community? Cheers, -John http://www.iunknown.com |
From: <ms...@te...> - 2002-06-21 12:45:50
|
Hi, I'm with VC 6.0 SP5 and Win2000. Running in debug mode for the TestPlugInRunner project show that CoCreateInstance failed !(read IF (SUCCEEDED( hr)) failed). Marc |---------+----------------------------> | | "Baptiste | | | Lepilleur" | | | <gai...@fr...| | | > | | | | | | 21.06.2002 13:06 | | | Please respond to| | | "Baptiste | | | Lepilleur" | | | | |---------+----------------------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| | | | To: "Cpp Unit Develpment Mailing List" <cpp...@li...>, <ms...@te...> | | cc: | | Subject: Re: [Cppunit-devel] DSPlugIn is working ! | >--------------------------------------------------------------------------------------------------------------------------------------------------| I just tested with the last release (1.9.8), and it works for me (VC6 SP5, Windows 2000). What is your platform ? Make sure that you compiled the release configuratoin of the add-in and copied it to the MSDev98/AddIns directory of VC++, and that the add-in is enabled in VC++. Notes that the add-in only works for VC++ 6.0 (VC++ 7.0 use a different API). Baptiste. ----- Original Message ----- From: <ms...@te...> To: "Cpp Unit Develpment Mailing List" <cpp...@li...>; <cpp...@li...> Sent: Thursday, June 20, 2002 4:58 PM Subject: Re: [Cppunit-devel] DSPlugIn is working ! > > All, > > I found this old one but have not been able to make it work in the last > release. > > I would appreciate any help, > > Thankx > M --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/ |
From: Baptiste L. <gai...@fr...> - 2002-06-21 11:31:51
|
----- Original Message ----- From: "Magnus Sirwiö" <si...@ho...> To: <cpp...@li...> Sent: Thursday, June 20, 2002 1:16 AM Subject: [Cppunit-devel] Using mfc in a DllPlugin success > Hi, > > Thank you so much for the hints. Its now working with some minor project > modifications. > > First of all I created a mfc dll appwizard project to get all defines and > linker options right. > Next thing was to include the following lines into the main DLL source file > (generated by the wizard) > > #include <cppunit/plugin/TestPlugIn.h> > CPPUNIT_PLUGIN_EXPORTED_FUNCTION_IMPL( CppUnit::TestPlugInDefaultImpl ); > > Note that the plugin macro has to be included after the stdafx.h include but > before the THIS_FILE define stuff! What happen if you put it after ? I gave it a quick look and it should cause any problems... > Add the usual CPPUNIT_DLL define to the project defines and link with the > cppunitd_dll.lib/cppunit_dll.lib libraries. > > Works perfectly with the TestPlugInRunner. (So far since I haven't tested it > that extensibly yet > > In order to get it to work with the DllPlugInTester I had to build a special > target with Use MFC in a Shared DLL. I suggest that such a target get added > to the DllPluginTester.dsp project. What it the only thing you need to do ? Did you need to add a CWinApp object to the source file (MFC use AfxGetApp() a lot) Glad to see there is no major issue, though. Baptiste. --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/index.html Author of The Text Reformatter, a tool for fanfiction readers and writers. Language: English, French. |
From: Baptiste L. <gai...@fr...> - 2002-06-21 11:31:50
|
----- Original Message ----- From: "Philippe Lavoie" <phi...@ca...> To: "Cpp Unit Develpment Mailing List" <cpp...@li...> Sent: Thursday, June 20, 2002 6:48 PM Subject: [Cppunit-devel] Dazed and confused a 15 char string breaks cppunit > > > > Hi all, > > > The following assert works in every project I tested > CPPUNIT_ASSERT_MESSAGE("012345678901234",true); This will call the function of Asserter indicated below, which makes a std::string out of the message. In 1.9.8, this string will be used as the first detail string of a Message, in earlier version, it will be passed to Exception constructor (what version are you using ?) void failIf( bool shouldFail, std::string message, SourceLine &sourceLine = SourceLine() ); > The following assert works in every project I tested except mine... > CPPUNIT_ASSERT_MESSAGE("0123456789012345",true); > > When it breaks... it breaks, it does an assertion error. I really have no > idea what is going on. I've checked the properties for my project, vs the > properties for projects that work without problems and I can't find what is > different. I can't find a different define. I can't find any substantical > differences. Could you provide the call stack ? I really don't see where this could come from (AFAIK, CppUnit don't use any fixed length buffer). The 15 limits sound a lot like a old VC 5 STL bug (there was an issue with 32 characters length string). Though, it would be odd that such a bug occurs in a newer version of STL... I tried to reproduce the problem by adding the assertion in a few of my projects (VC 6 SP5, CppUnit CVS version), but did not succeed. > The only clue I have about the problem is that the following warning only > shows for my project and > > doesn't show for any other projects. Hmm, I'm not sure if those warning are really the cause. It indicates that the template implementation is not exported in the DLL (std::string is a template). This is not usually an issue since the template is implemented in the user project. What is really odd is that the std::string template is supposed to be exported by the STL (at the end of the 'string' header, you can find those 'extern template...' which do that, at least, in VC 6). It sound like as if the wrong version of the runtime library was being used... > > c:\build\Include\cppunit\SourceLine.h(51) : warning C4251: > 'CppUnit::SourceLine::m_fileName' : class > 'std::basic_string<_Elem,_Traits,_Ax>' needs to have dll-interface to be > used by clients of class 'CppUnit::SourceLine' [...] > > Please Help > > Phil > > PS I'm using VS7.0 --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/ |
From: Baptiste L. <gai...@fr...> - 2002-06-21 11:05:54
|
I just tested with the last release (1.9.8), and it works for me (VC6 SP5, Windows 2000). What is your platform ? Make sure that you compiled the release configuratoin of the add-in and copied it to the MSDev98/AddIns directory of VC++, and that the add-in is enabled in VC++. Notes that the add-in only works for VC++ 6.0 (VC++ 7.0 use a different API). Baptiste. ----- Original Message ----- From: <ms...@te...> To: "Cpp Unit Develpment Mailing List" <cpp...@li...>; <cpp...@li...> Sent: Thursday, June 20, 2002 4:58 PM Subject: Re: [Cppunit-devel] DSPlugIn is working ! > > All, > > I found this old one but have not been able to make it work in the last > release. > > I would appreciate any help, > > Thankx > M --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/ |
From: Philippe L. <phi...@ca...> - 2002-06-20 16:49:01
|
Hi all, The following assert works in every project I tested CPPUNIT_ASSERT_MESSAGE("012345678901234",true); The following assert works in every project I tested except mine... CPPUNIT_ASSERT_MESSAGE("0123456789012345",true); When it breaks... it breaks, it does an assertion error. I really have = no idea what is going on. I've checked the properties for my project, vs = the properties for projects that work without problems and I can't find = what is different. I can't find a different define. I can't find any = substantical differences. The only clue I have about the problem is that the following warning = only shows for my project and doesn't show for any other projects. c:\build\Include\cppunit\SourceLine.h(51) : warning C4251: = 'CppUnit::SourceLine::m_fileName' : class = 'std::basic_string<_Elem,_Traits,_Ax>' needs to have dll-interface to be = used by clients of class 'CppUnit::SourceLine' with [ _Elem=3Dchar, _Traits=3Dstd::char_traits<char>, _Ax=3Dstd::allocator<char> ] c:\build\Include\cppunit\Exception.h(18) : warning C4275: non = dll-interface class 'exception' used as base for dll-interface class = 'CppUnit::Exception' h:\Program Files\Microsoft Visual Studio = .NET\Vc7\include\exception(27) : see declaration of 'exception' h:\acuraci\Atlantic\build\Include\cppunit\Exception.h(17) : see = declaration of 'CppUnit::Exception' c:\build\Include\cppunit\Exception.h(73) : warning C4251: = 'CppUnit::Exception::m_message' : class = 'std::basic_string<_Elem,_Traits,_Ax>' needs to have dll-interface to be = used by clients of class 'CppUnit::Exception' with [ _Elem=3Dchar, _Traits=3Dstd::char_traits<char>, _Ax=3Dstd::allocator<char> ] c:\build\Include\cppunit\TestCase.h(50) : warning C4251: = 'CppUnit::TestCase::m_name' : class = 'std::basic_string<_Elem,_Traits,_Ax>' needs to have dll-interface to be = used by clients of class 'CppUnit::TestCase' with [ _Elem=3Dchar, _Traits=3Dstd::char_traits<char>, _Ax=3Dstd::allocator<char> ] Please Help Phil PS I'm using VS7.0 |
From: <ms...@te...> - 2002-06-20 15:07:07
|
All, I found this old one but have not been able to make it work in the last release. I would appreciate any help, Thankx M |---------+-----------------------------------------> | | "Baptiste Lepilleur" | | | <bl...@cl...> | | | Sent by: | | | cpp...@li...ur| | | ceforge.net | | | | | | | | | 21.09.2001 21:12 | | | Please respond to "Baptiste | | | Lepilleur" | | | | |---------+-----------------------------------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| | | | To: "Cpp Unit Develpment Mailing List" <cpp...@li...> | | cc: | | Subject: [Cppunit-devel] DSPlugIn is working ! | >--------------------------------------------------------------------------------------------------------------------------------------------------| Finally heard from Patrick Berny. He fixed the problem (some part of the registry was not updated). The fix has been comitted. Refer to INSTALL-WIN32.txt for install instruction. This is really a nifty feature. Thanks again Patrick! Baptiste. --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/index.html Author of The Text Reformatter, a tool for fanfiction readers and writers. Language: English, French (Well, I'm French). _______________________________________________ Cppunit-devel mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppunit-devel |
From: Magnus S. <si...@ho...> - 2002-06-19 23:17:00
|
Hi, Thank you so much for the hints. Its now working with some minor project modifications. First of all I created a mfc dll appwizard project to get all defines and linker options right. Next thing was to include the following lines into the main DLL source file (generated by the wizard) #include <cppunit/plugin/TestPlugIn.h> CPPUNIT_PLUGIN_EXPORTED_FUNCTION_IMPL( CppUnit::TestPlugInDefaultImpl ); Note that the plugin macro has to be included after the stdafx.h include but before the THIS_FILE define stuff! Add the usual CPPUNIT_DLL define to the project defines and link with the cppunitd_dll.lib/cppunit_dll.lib libraries. Works perfectly with the TestPlugInRunner. (So far since I haven't tested it that extensibly yet In order to get it to work with the DllPlugInTester I had to build a special target with Use MFC in a Shared DLL. I suggest that such a target get added to the DllPluginTester.dsp project. /Magnus >Hi, > > Having trouble compiling my DllPlugin when using mfc. The compiler > complains > about DllMain already beeing defined. That's because the 'default' macro implement DllMain. Use the following macro instead: CPPUNIT_PLUGIN_EXPORTED_FUNCTION_IMPL( CppUnit::TestPlugInDefaultImpl ); This will exports the needed function, but will not implement DllMain. > My testcase works like a charm without mfc. > Changing the project settings to "Use MFC in a Shared Dll" and >including > in my testcase source file makes the compiler barf at me! You may want to start your project using the Wizard. I'm not sure what the spefic are, but you probably need to define some symbols to indicate that your project use MFC DLL and is a DLL (MFC TestRunner generate a MFC DLL that use CppUnit DLL, so this is not a CppUnit issue). Notes that to run the DLL, you will need to use the MFC plug-in test runner since DllPlugInTester is not an MFC application (though the change should be very easy to do, just start with a MFC console app) Please, keep us posted on your progress (I haven't try doing that, and I'm curious about the result) Baptiste. --- Baptiste Lepilleur http://gaiacrtn.free.fr/ _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. |
From: Baptiste L. <gai...@fr...> - 2002-06-19 17:38:15
|
----- Original Message ----- From: "Magnus Sirwiö" <si...@ho...> To: <cpp...@li...> Sent: Tuesday, June 18, 2002 10:40 PM Subject: [Cppunit-devel] Is using mfc in a DllPlugin possible (CppUnit 1.9.8)? > Hi, > > Having trouble compiling my DllPlugin when using mfc. The compiler complains > about DllMain already beeing defined. That's because the 'default' macro implement DllMain. Use the following macro instead: CPPUNIT_PLUGIN_EXPORTED_FUNCTION_IMPL( CppUnit::TestPlugInDefaultImpl ); This will exports the needed function, but will not implement DllMain. > My testcase works like a charm without mfc. > Changing the project settings to "Use MFC in a Shared Dll" and including > <afx.h> in my testcase source file makes the compiler barf at me! You may want to start your project using the Wizard. I'm not sure what the spefic are, but you probably need to define some symbols to indicate that your project use MFC DLL and is a DLL (MFC TestRunner generate a MFC DLL that use CppUnit DLL, so this is not a CppUnit issue). Notes that to run the DLL, you will need to use the MFC plug-in test runner since DllPlugInTester is not an MFC application (though the change should be very easy to do, just start with a MFC console app) Please, keep us posted on your progress (I haven't try doing that, and I'm curious about the result) Baptiste. --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/ |
From: Magnus S. <si...@ho...> - 2002-06-18 20:40:23
|
Hi, Having trouble compiling my DllPlugin when using mfc. The compiler complains about DllMain already beeing defined. My testcase works like a charm without mfc. Changing the project settings to "Use MFC in a Shared Dll" and including <afx.h> in my testcase source file makes the compiler barf at me! Anyone got any suggestions? \Magnus _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com |
From: Baptiste L. <gai...@fr...> - 2002-06-16 19:29:42
|
Well, the TODO is finally shrinking a lot. I fell the next stable release getting closer... Two majors features: macros to add custom tests to your suite, and XmlOutputter customization. I'd really like to have feedback on those two (needed adjustment...). The tar balls can be found at: http://cppunit.sourceforge.net/snapshot/ http://cppunit.sourceforge.net/snapshot/cppunit-1.9.8.tar.gz http://cppunit.sourceforge.net/snapshot/cppunit-docs-1.9.8.tar.gz Enjoy, Baptiste. New in CppUnit 1.9.8: --------------------- - New custom test macros - Exception message are now structured - Added detail field to MFC TestRunner - New XmlDocument class to easily create new XML output format - XmlOutputter customization - Test plug-in XMLOutputter hook - ClockerPlugIn example includes test time in XML output - DllPlugInTester allows test plug-in to hook the XmlOutputter - Configurable CompilerOutputter wrapping * New custom test macros - 3 new macros have been added for use when declaring test fixture suite: - CPPUNIT_TEST_CUSTOM : to specify a method that returns an instance of Test to add to the suite - CPPUNIT_TEST_CUSTOM : to specify a method that add some tests to the suite - CPPUNIT_TEST_ADD : to add a test to the suite. Used this to create custom CPPUNIT_TEST_xxx macros. See macros documentation for examples and details. * Exception message - Exception message are now stored in a Message object instead of a string. A message is composed of two items: - a short description (~20/30 characters) - a list of detail strings The short description is used to indicate how the detail strings should be interpreted. It usually indicates the failure types, such as "assertion failed", "forced failure", "unexpected exception caught", "equality assertion failed"... It should not contains new line characters (\n). Detail strings are used to provide more information about the failure. It can contains the asserted expression, the expected and actual values in an equality assertion, some addional messages... Detail strings can contains new line characters (\n). This change allow ouputters to deal with all failure the same way (there is no special case for the equality assertion any more). * New XmlDocument class to easily create new XML output format - Classes XmlDocument and XmlElement where extracted from XmlOutputter. This help writing outputters that use a completly different XML format. - XmlDocument represents a XML file, and XmlElement represents a XML element. * XmlOutputter customization - Xml output can be customized using XmlOutputterHook. To do so, subclass XmlOutputterHook and register it to the XmlOutputter with addHook() before call XmlOutputter::write(). Hook can be used to add some datas to the XmlDocument or the XmlElement of a specific hook. Methods have been added to XmlElement to help navigating and modifying the XmlDocument. See ClockerPlugIn example. * MFC TestRunner - The name of the test is displayed just before being run. - Browse Test Hierarchy dialog is resizable. - Better (and cleaner) handling of windows resizing - Failure list now only show the short description of the failure. - Edit field added to display the details of the selected failure. * MFC test plug-in runner (TestPlugInRunner): - command line: a dll name can be specified on the command after -testsuite: example: TestPlugInRunnerd.exe -testsuite Simpled.dll - Layout configuration is stored/restored. * Test plug-in XML output Hook - TestPlugIn interface provides a mean for plug-in to register hook for XML output. Practically, this allow plug-in to add specific data to the output. See ClockerPlugIn example, which add timing datas to the xml output. * DllPlugInTester: - added option -w / --wait to wait for the user to press a key before exiting. - plug-in can now provides XmlOutputterHook to add specific datas to the XML ouput. See ClockerPlugIn example. * CompilerOutputter wrapping is parametrized - Wrap column can be set with setWrapColumn(). Default is now 79 instead of 80. - Wrapping can be disabled with setNoWrap(). * Examples: - ClockerPlugIn: the example now use the new XmlOutputterHook. Test time are now included in the XML output. See examples/ClockerPlugIn/ReadMe.txt for details. * Bug Fix: - CompilerOutputter: fixed wrapping issues (UT magic!) - DllPlugInTester: use ISO-LATIN1 encoding if none is given. Flag --xsl was ignored. - MfcUi plug-in runner (TesTPlugInRunner): better handling of history when loading and reloading a dll. - Qt Test Runner: minor bug fixes. Should compile on Unix. - XmlOutputter: use the default encoding if an empty string is given as encoding * Compatibility Break: - CompilerOutputter: removed printNotEqualMessage() and printDefaultMessage(). No longer needed since Exception message are processed in a generic way. Removed wrap(). Extracted to StringTools. - Exception constructor takes a Message instead of a string. Notes that the first argument in Message constructor is a short description, not the message. Therefore, the change will usualy have the following form: Exception( Message( "assertion failed", oldMessage ) ); You may want to use Asserter functions instead of constructing and throwing the exception manually. - TestPlugInAdapter: renamed TestPlugInDefaultImpl. - TestSuiteBuilder: removed default constructor. All remaining constructors take an additional argument of type TestNamer used to specify the fixture named and generate test case name. Remove template method addTestCallerForException(). Use addTest() instead (see CPPUNIT_TEST_EXCEPTION implementation). - TextTestResult: most printing method were removed. This task is now delegated to TextOuputter. - XmlElement: renamed addNode() to addElement(). - XmlOutputter: removed methods writeProlog() and writeTestResult() which are replaced by XmlDocument. Renamed makeRootNode() to setRootNode(). It no longer returns the root node, but set the root node of the XML document. - XmlOuputter::Node: class has been extracted and renamed XmlElement. * Deprecated: - Asserter: all functions that use a string for the failure message. Construct a Message instead (see Exception constructor compatiblity break and Exception message feature). --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/ |