cppunit-devel Mailing List for CppUnit - C++ port of JUnit (Page 40)
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: Stanley S. <su...@t-...> - 2002-04-15 20:15:44
|
I'm getting the following compiler option after running = autogen.sh/gmake: -Wp,-MD,.deps/Win32DynamicLibraryManager.pp which I assume is some sort of Windows thing. I'm compiling on Solaris = 8 with the Forte 6 compiler, so is there a way to tell the system not to = generate this part of the make? I know it's just a warning, but it = makes problems easier to find when I don't have lots of warnings that = don't mean anything. Also, include/cppunit/config/SelectDllLoader.h doesn't terminate in a = newline, which is an error on this platform. I realize it shouldn't = make a difference, considering where it tis, but it does. The enum in include/cppunit/plugin/DynamicLibraryManagerException.h;=20 enum Cause, terminated in a comma, which Solaris also objects to. I'm up to the ui directory in building the latest CVS version on = Solaris, by the way. There error there is "No file to make target = 'all'." |
From: Baptiste L. <gai...@fr...> - 2002-04-15 17:20:55
|
Crossplatform test plug-in is the main new feature. I thing I got it working on both Unix and Windows (well, at least compiling on Unix. Check UnixDynamicLibraryManager.cpp). Though, I need the help of some automake/configure wizard to finalize the thing: The unix man page says that the dlXXX function use the dl.so library. This means that the examples need to be linked with that library. Now, dlopen(), dlclose() and dlsym() functions are only used if CPPUNIT_NO_TESTPLUGIN is not defined and CPPUNIT_HAVE_DLFCN_H is defined (see include/config/SelectDllLoader.h for detail). That means that the library should only be linked in those case. How do you do that ? This a blocking issue, at the current time, the example won't link on Unix. As usual, it can be found at: http://cppunit.sourceforge.net/snapshot/ http://cppunit.sourceforge.net/snapshot/cppunit-1.9.2.tar.gz http://cppunit.sourceforge.net/snapshot/cppunit-docs-1.9.2.tar.gz New in CppUnit 1.9.2: ---------------------- In short: - Cleaner XML output - Crossplatform Test plug-in - TestPlugInSuite to wrap test plug-in - More TestPlugIn documentation. * TestPlugIn: - The test plug-in functionnality has been rewritten from scrash. TestPlugIn related macro are now crossplatform (exporting the plug-in function from the dynamic library...). - Class DynamicLibraryManager provides a generic way to access dynamic library. Platform specific implementation provided for WIN32, unix, BeOs. Can be very easily ported to new platform. - A More flexible and hopefully extensible interface has been introduced (CppUnitPlugIn). - A default implementation using the test factory registry is provided (TestPlugInDefaultImpl). Can be easily customized. - The one line test plug-in declaration was renamed CPPUNIT_PLUGIN_IMPLEMENT. See modules/Writing Test Plug-in documentation and examples/EasyTestPlugIn. * XmlOutputter: - XML output is now indented. Nodes that don't have children are one line tag. The output can now easily be read. * Compatibility break: - class TestSucessListener was renamed to TestSuccessListener. - XmlOutput: renamed tag <SuccessfulTests> to <SuccessfulTests> - Global fix of the 'success' typo (was misspelled 'sucess'). Main impacts are listed above, but check your own code in case you override some protected/private methods. - TestPlugInInterface (include/msvc6/TestPlugInInterface.h): this header and class are now obsolete. You should use include/cppunit/plugin/TestPlugIn.h instead. Macro CPPUNIT_TESTPLUGIN_IMPL have been replaced by CPPUNIT_PLUGIN_IMPLEMENT. - TestDecorator inherits Test instead of TestLeaf. - DllPlugInTester only run DLL implementing the new new TestPlugIn interface. Baptiste. |
From: Duane M. <dua...@ma...> - 2002-04-14 17:35:45
|
My two cents for what its worth is to do nothing. There is no "True" Unicode. There are several unicode formats. UTF-8, UTF-16, and the upcoming UTF-32 among others. I have been told by some associates that keep up with such things that UTF-16, while currently being used, is on its way out in favor of UTF-32. It is most often recommended to use the simple UTF-8 for most applications. UTF-8 will likely satisfy most of us and require absolutlely no changes. UTF-8 is completely compatible with ASCII (for characters < 128). UTF-8 fits nicely in a standard string. Anyone that is concerned about such things has already worked around any problems involved in using UTF-8 with std::string. This mostly involved parsing and locating character seperations which is of little concern to CppUnit. Another reason to do nothing is that I would hope that the C++ standards committee at least makes some statement about Unicode or internationalization. They have done lots of work to put in infrastructure that very few people really understand. I believe that they need to make some statement or show some examples of how to truly deal with Unicode. My recommendation is to do nothing. Is there some other driving factor behind this decision? --- At Fri, 14 Jun 2002 12:11:46 +0200, Baptiste Lepilleur wrote: > I intend to give CppUnit true UNICODEsupport in assertion message (the >description of the failure, returned by Exception::what()). > > CppUnit should be able to deal with *both* ANSI and UNICODE string. It's >likely that not every unit tests in a project will use one of those >exclusively. > > The current solution I found to this problem is to introduce a wrapper >string class that can be constructed from either ANSI or UNICODE string >(kind of like the MFC CString). That class would also provides accessor to >retreive the string as either ANSI or UNICODE. Conversion from on format to >another would be done automatically. > > Exception and NotEqualException would be modified to use the string >class described above, as well as Asserter functions (functions that 'do' >the assertion by creating the Exception and throwing it). > > That solution have the advantage of having little impact on the existing >code (both CppUnit and user). Most impact will likely be on Outputter (I >have some really twistest ideas for this, but that for later). Does anybody >see another solution ? Suggestions ? > > On a more technical side, I'm not very familar with Unicode on Windows >(never made an application that truely use Unicode), and just about nothing >on Unix. So here are some questions: > > 1) Is std::wstring available on all plateform ? > 2) Are std::wcout, std::wcerr available on all plateform ? > 3) Is the attached code fragment the correct way to do the conversion >between std::string and std::wstring on Windows. > 4) How do we do the conversion on Unix ? Would a dummy conversion (to >and fro iso-latin1) do ? ...Duane -- "If tyranny and oppression come to this land, it will be in the guise of fighting a foreign enemy." - James Madison |
From: Baptiste L. <gai...@fr...> - 2002-04-14 10:06:07
|
I intend to give CppUnit true UNICODEsupport in assertion message (the description of the failure, returned by Exception::what()). CppUnit should be able to deal with *both* ANSI and UNICODE string. It's likely that not every unit tests in a project will use one of those exclusively. The current solution I found to this problem is to introduce a wrapper string class that can be constructed from either ANSI or UNICODE string (kind of like the MFC CString). That class would also provides accessor to retreive the string as either ANSI or UNICODE. Conversion from on format to another would be done automatically. Exception and NotEqualException would be modified to use the string class described above, as well as Asserter functions (functions that 'do' the assertion by creating the Exception and throwing it). That solution have the advantage of having little impact on the existing code (both CppUnit and user). Most impact will likely be on Outputter (I have some really twistest ideas for this, but that for later). Does anybody see another solution ? Suggestions ? On a more technical side, I'm not very familar with Unicode on Windows (never made an application that truely use Unicode), and just about nothing on Unix. So here are some questions: 1) Is std::wstring available on all plateform ? 2) Are std::wcout, std::wcerr available on all plateform ? 3) Is the attached code fragment the correct way to do the conversion between std::string and std::wstring on Windows. 4) How do we do the conversion on Unix ? Would a dummy conversion (to and fro iso-latin1) do ? Thanks in advance, Baptiste. --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/ |
From: Baptiste L. <gai...@fr...> - 2002-04-14 10:06:06
|
----- Original Message ----- From: "Baptiste Lepilleur" <gai...@fr...> To: "FUKUDA, Fumiki" <ep...@ba...>; <cpp...@li...> Sent: Saturday, April 13, 2002 9:36 PM Subject: Re: [Cppunit-devel] xml-stylesheet for CppUnit::XmlOutputter > ----- Original Message ----- > From: "FUKUDA, Fumiki" <ep...@ba...> > To: "Baptiste Lepilleur" <gai...@fr...>; > <cpp...@li...> > Sent: Saturday, April 13, 2002 9:15 PM > Subject: Re: [Cppunit-devel] xml-stylesheet for CppUnit::XmlOutputter > [...] > > by the way, > > 1: '...Sucess..' needs to be corrected to '...Success...' ? > I'll fix that. Done. It seems I'm really angry with that word (managed to have a method with both spelling in its name). Still, it's amasing that nobody reported that before... Baptiste. > > > 2: TextTestRunner.cpp missing in project 'cppunit_dll' @1.9.0 > And that too. > > Thanks, > Baptiste. > > > _______________________________________________ > Cppunit-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppunit-devel > |
From: Baptiste L. <gai...@fr...> - 2002-04-13 19:30:10
|
----- Original Message ----- From: "FUKUDA, Fumiki" <ep...@ba...> To: "Baptiste Lepilleur" <gai...@fr...>; <cpp...@li...> Sent: Saturday, April 13, 2002 9:15 PM Subject: Re: [Cppunit-devel] xml-stylesheet for CppUnit::XmlOutputter > > Though, IE won't display the node contents (is seems that xsl:value-of > > doesn't work, it can't even print the statistics) ! > > hmmm... I'm afraid your IE can not hanlde Japanese-charset:'shift_jis'... > I can see it. I changed the encoding to ISO-8859-1in both xml and xsl file. Also Changed the font name in the style. Font is not the problem. IE display "No failed test" which means its fall back on the otherwise close. Since it displays the Statistics array (but keep it empty), it means that it managed to match a "Statistics" node, and as such decode some of the XML file... > > > Well, anyway, I just modified XmlOutputter to produce a cleaner output > > (indented, and one line tagging for node with content). > thanks. > > by the way, > 1: '...Sucess..' needs to be corrected to '...Success...' ? I'll fix that. > 2: TextTestRunner.cpp missing in project 'cppunit_dll' @1.9.0 And that too. Thanks, Baptiste. |
From: FUKUDA, F. <ep...@ba...> - 2002-04-13 19:15:58
|
> Though, IE won't display the node contents (is seems that xsl:value-of > doesn't work, it can't even print the statistics) ! hmmm... I'm afraid your IE can not hanlde Japanese-charset:'shift_jis'... I can see it. > Well, anyway, I just modified XmlOutputter to produce a cleaner output > (indented, and one line tagging for node with content). thanks. by the way, 1: '...Sucess..' needs to be corrected to '...Success...' ? 2: TextTestRunner.cpp missing in project 'cppunit_dll' @1.9.0 |
From: Baptiste L. <gai...@fr...> - 2002-04-13 18:51:06
|
Thanks Steve. 1.1.10 is not so far away, though ;-) Baptiste. ----- Original Message ----- From: "Steve M. Robbins" <ste...@vi...> To: "CppUnit Development" <cpp...@li...> Sent: Saturday, April 13, 2002 8:39 PM Subject: Re: [Cppunit-devel] [ANNOUNCE] CppUnit 1.8.0 release > On Thu, Apr 11, 2002 at 01:28:39PM +0200, Baptiste Lepilleur wrote: > > I finally managed to make CppUnit 1.8.0 release. > > Great work, Baptiste! > > A note to the Debian devotees: I've just uploaded the debian package > and you can expect it to start showing up on your favourite mirror > in the next few days. > > -steve > > > _______________________________________________ > Cppunit-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppunit-devel > |
From: Baptiste L. <gai...@fr...> - 2002-04-13 18:50:08
|
Thanks. Though, IE won't display the node contents (is seems that xsl:value-of doesn't work, it can't even print the statistics) ! Well, anyway, I just modified XmlOutputter to produce a cleaner output (indented, and one line tagging for node with content). Baptiste. ----- Original Message ----- From: "FUKUDA, Fumiki" <ep...@ba...> To: <cpp...@li...> Sent: Saturday, April 13, 2002 5:21 PM Subject: [Cppunit-devel] xml-stylesheet for CppUnit::XmlOutputter > stylesheet (for MS-IE5) and its sample result can be get at: > > http://www.trickpalace.net/cppll/cuppa/work/report.xsl > http://www.trickpalace.net/cppll/cuppa/work/testrun.xml > > - FUKUDA, Fumiki > > > > _______________________________________________ > Cppunit-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppunit-devel > |
From: Steve M. R. <ste...@vi...> - 2002-04-13 18:39:53
|
On Thu, Apr 11, 2002 at 01:28:39PM +0200, Baptiste Lepilleur wrote: > I finally managed to make CppUnit 1.8.0 release. Great work, Baptiste! A note to the Debian devotees: I've just uploaded the debian package and you can expect it to start showing up on your favourite mirror in the next few days. -steve |
From: Baptiste L. <gai...@fr...> - 2002-04-13 15:59:28
|
Many new features. The tar ball can be found at: http://cppunit.sourceforge.net/snapshot/ http://cppunit.sourceforge.net/snapshot/cppunit-1.9.0.tar.gz http://cppunit.sourceforge.net/snapshot/cppunit-docs-1.9.0.tar.gz I especially want feedback from VC++ 7.0 (.NET) since I should have solved the problem with MfcTestRunner (removed add-in dependency). New in CppUnit 1.9.0: ---------------------- In short: - Exploration of the test hierarchy without RTTI support - Utility methods to find a test in the hierarchy - TestPath to store/load the path to a specific test in the hierarchy - Generic TestRunner - Style sheet support added to XML ouput. - CompilerOutputter supports run-time parametrization of error location format. - Tracking of test suite run. - Debugging and post-build testing of DLL using DllPlugInTester. - Easy creation a test plug-in and test plug-in new example * Test: - Exploration of the test hierarchy without RTTI support: Added Test::getChildTestCount() and Test::getChildTestAt() to walk the test hierarchy without RTTI. - Utility methods to find a test in the hierarchy: Added Test::findTest(), Test::findTestPath() and Test::resolveTestPath(). * TestPath: - A new class that store the path to a specific test (list of pointer). Can be converted into a string and constructed from a string. Typically used with TestRunner. * TestListener: - Added startSuite() and endSuite() callback that are called before and after a test suite runs its child tests. See TestListener for detail and new example. * CompilerOutputter: - Support run-time parametrization of compiler error format. Support for gcc error format added. See CompilerOutputter::setLocationFormat(). * XmlOutputter: - Added style sheet support. - XML structure change (see Compatibility break) * DllPlugInTester: (src/msvc6/DllPlugInTester, in src/CppUnitLibraries.dsw) - An application to load a DLL test plug-in and run the specified test. Test result are reported using a CompilerOutputter. It can be used for post-build testing, but to debug DLL too! See examples/msvc6/TestPlugIn/TestPlugIn.dsp which demonstrate both. * TestPlugInInterface (include/msvc6/TestPlugInInterface.h): - Easy creation a test plug-in with the new macro CPPUNIT_TESTPLUGIN_IMPL that implements and exports everything for you. See examples/msvc6/EasyTestPlugIn for an example. * Compatibility break: - Test::toString() has been removed. Applies to all subclass of Test. It was not used by the framework and was source of confusion with getName(). - TestCase::run(void) and TestCase::defaultResult() have been removed. Using the run() method with a TestResult instead. - XmlOutput: added a message element to the XML structure. The message associated to a failure is now in the content of <Message> element instead of in the content of the <FailedTest> element. Changed from: <FailedTest id="6"> <Name>test6</Name> <FailureType>Error</FailureType> error2 </FailedTest> To: <FailedTest id="6"> <Name>test6</Name> <FailureType>Error</FailureType> <Message>error2</Message> </FailedTest> * Deprecated: - CompilerOutputter::defaultOutputter(): use default constructor instead. * Bug fix: - XmlOutputter: did not escape content (bug #540944). - Included qt/examples in distribution - Removed dependency of MfcTestRunner on DSPlugIn. It should now compile with VC++ 7. Baptiste. --- Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/ |
From: FUKUDA, F. <ep...@ba...> - 2002-04-13 15:51:02
|
stylesheet (for MS-IE5) and its sample result can be get at: http://www.trickpalace.net/cppll/cuppa/work/report.xsl http://www.trickpalace.net/cppll/cuppa/work/testrun.xml - FUKUDA, Fumiki |
From: Baptiste L. <gai...@fr...> - 2002-04-13 14:55:50
|
Is it possible to wrap the signal logic into a class (even if it use global variable) ? I'm planning to add a feature to add 'custom' exception support (export not based on std::exception) to CppUnit. To do that, I just call a must on a class with the Test to run and the TestResult which 'protect ' the test run. In your case, that would means trapping the signal, and throwing adding a failure to TestResult. I'm really interessed into this, because VC++ does this automatically for us in debug mode. This is not the case on Unix, and as such does not provide a consistent behavior across plateform. As a consequence, on Unix, you would need a TestListener that print the test name before running the test, just to now which test failed... Baptiste. ----- Original Message ----- From: "Robert Wenner" <ro...@po...> To: <cpp...@li...> Sent: Thursday, March 21, 2002 5:56 PM Subject: [Cppunit-devel] Signal handling in Linux Hi, I expect some of my tests to access a null pointer and thus to raise a signal (SIGSGV). I would like to thow an Exception on arrival of any signal to avoid it terminating the program and instead be recorded as a failed or succeded test run. The C++ standard does not allow any C++ features being used in signal handler functions, especially no exceptions. I really do not like using a global variable (or singleton) which I check at the end of the test. Can anybody please point me to a more elegant solution? Is there perhaps some kind of compiler setting to map signals to exceptions by default (I use g++)? Thanks in advance Robert _______________________________________________ Cppunit-devel mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppunit-devel |
From: Baptiste L. <gai...@fr...> - 2002-04-12 19:31:06
|
I made both change. You can get them from the CVS repository. Would you mind sharing your XSL script with us ? As weird at it seems, I never really got to see what you can do with the XML output. Baptiste. ----- Original Message ----- From: "FUKUDA Fumiki" <ff...@nt...> To: <cpp...@li...> Sent: Friday, April 12, 2002 9:26 AM Subject: Re: [Cppunit-devel] setStylesheet on XmlOutputter > > --- "[Cppunit-devel] setStylesheet on XmlOutputter" / FUKUDA Fumiki / 2002/04/12 15:50:51 +0900 --- > > >>I've added that feature. > >>... > > > >great! May I ask your favor? one more request for XmlOutputter: > > in addition, failure/error messages want to be 'tagged' such as: > > <FailedTest id="1" > > <Name > > test::FooTest.test1</Name> > <FailureType > > Assertion</FailureType> > <Location > > <File > > FooTest.cpp</File> > <Line > > 9</Line> > </Location> > <Message>no implementation</Message></FailedTest> <-- HERE! > > this makes XSL easy to trnsform. > > please consider. ('setStylesheet' method also) > > -----:-----:-----:-----:-----:-----:-----:-----:-----:----- > FUKUDA (episteme) Fumiki -- magical, but never a magic... > > _______________________________________________ > Cppunit-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppunit-devel > |
From: FUKUDA F. <ff...@nt...> - 2002-04-12 07:27:07
|
--- "[Cppunit-devel] setStylesheet on XmlOutputter" / FUKUDA Fumiki / 2002/04/12 15:50:51 +0900 --- >>I've added that feature. >>... > >great! May I ask your favor? one more request for XmlOutputter: in addition, failure/error messages want to be 'tagged' such as: <FailedTest id="1" > <Name > test::FooTest.test1</Name> <FailureType > Assertion</FailureType> <Location > <File > FooTest.cpp</File> <Line > 9</Line> </Location> <Message>no implementation</Message></FailedTest> <-- HERE! this makes XSL easy to trnsform. please consider. ('setStylesheet' method also) -----:-----:-----:-----:-----:-----:-----:-----:-----:----- FUKUDA (episteme) Fumiki -- magical, but never a magic... |
From: FUKUDA F. <ff...@nt...> - 2002-04-12 06:51:03
|
--- "Re: [Cppunit-devel] encoding of XmlOutputter @1.7.1-alpha" / Baptiste Lepilleur / 2002/02/28 12:58:18 +0100 --- >I've added that feature. >... great! May I ask your favor? one more request for XmlOutputter: >> CppUnit::XmlOutputter prints <?xml...?> at the beginning. >> and it's encoding(charset) is fixed as 'ISO-8859-1' >> however assertion message is NOT always English >> # yes, I am a Japanese :-) >> >> I understand it will be too heavy to support various of encodings. >> so, as alternative: >> >> class XmlOutputter { >> ... >> std::string m_encoding; >> public: >> XmlOutputter( TestResult *result, std::ostream &stream, const char* >encoding="ISO-8859-1" ) >[...] class XmlOutputter { ... string m_stylesheet; public: void setStylesheet(const char* uri) { m_stylesheet = uri; } }; void XmlOutputter::writeProlog() { m_stream << "<?xml version=\"1.0\" " "encoding='" << m_encoding << "' standalone='yes' ?>" << std::endl; // COULD YOU ADD FOLLWING TO SPECIFY THE STYLESHEET? if ( !m_stylesheet.empty() ) { m_stream << "<?xml-stylesheet type=\"text/xsl\" href=\"" << m_stylesheet << "\"?>" << std::endl; } } -----:-----:-----:-----:-----:-----:-----:-----:-----:----- FUKUDA (episteme) Fumiki -- magical, but never a magic... |
From: Baptiste L. <gai...@fr...> - 2002-04-11 11:21:51
|
I finally managed to make CppUnit 1.8.0 release. Available on: https://sourceforge.net/projects/cppunit/ Thanks for your help, Baptiste. New in CppUnit 1.8.0: ---------------------- In short: - new assertions - new facilities to write custom assertions - new macros to define test case in your fixture - registration of test fixture in named suite - xml & compiler format test result output - a new graphic test runner for the QT library - MFC test runner window is resizable - cppunit as a DLL - Unicode support for MFC test runner. - architecture clean-up: TestResultCollector extracted from TestResult. - architecture clean-up: TestFixture extracted from TestCase. - cookbook and documentation updated. * New assertion (TestAssert.h): CPPUNIT_FAIL(message) : equivalent to CPPUNIT_ASSERT_MESSAGE( message, false ) CPPUNIT_ASSERT_EQUAL_MESSAGE( expectedValue, actualValue, additionalMessage ): behave like CPPUNIT_ASSERT_EQUAL but allow to add some contextual information. * New macros to write test case (HelperMacros.h): CPPUNIT_TEST_EXCEPTION that expect an exception of a specified type to be thrown. CPPUNIT_TEST_FAIL that expect a test to fail. CPPUNIT_TEST_SUITE_NAMED_REGISTRATION to register a suite in a named suite. See cppunittest example for a demo. * TextTestRunner (TextTestRunner.h): -run() returns a boolean indicating is the run was sucessful. -the constructor and setOutputter() allow you do define a specific outputter to print the test result (CompilerOutputter, TextOutputter, XmlOutputter...) -result() provide access to the result of the test run. -eventManager() give access to the TestResult, allowing you to register others TestListener. * TestResult (TestResult.h): - That class has been splitted in two: TestResult and TestResultCollector. - TestResult manages the TestListener (registration and event dispatch), as well as the stop flag indicating if the current test run should be interrupted. All other responsabilites have been moved to TestResultCollector. - TestResult no longer hold the result of the test run (this is done by TestResultCollector which is a TestListener). * TestListener (TestListener.h): - all failures and errors are reported using a single method: virtual void addFailure( const TestFailure &failure ) => the failure object life time is limited to that of the method call. Use TestFailure::isError() to distinguish error from failure. Use TestFailure::clone() to obtain a duplicate of the failure. * New helpers to construct your own assertion (Asserter.h): It is now very easy to create your own assertion macro with failure location. Asserter namespace contains functions used to construct and throw exception to report failure. See Asserter documentation for an example of usage, and examples/cppunittest/XmlUniformiser.h for a real life example. CPPUNIT_SOURCELINE() macro have been added (SourceLine.h). It captures the failure location in a SourceLine object. Use it to write your own macros. Asserter namespace contains functions used to construct and throw exception to report failure. See Asserter documentation for an example of usage, and examples/cppunittest/XmlUniformiser.h for a real life example. * TestListener (TestListener.h): - TestSucesssListener : a simple listener that checks if a test has failed. - TestResultCollector : store all the test result. This class has been extracted from the hold TestResult class. - TextTestProgressListener : print dot on cout to each time a test ends. Letter 'F' and 'E' are printed when a failure or an error occurs. * Output (Outputter.h): - XML output: You can dump the TestResult as an XML document using XmlOutputter. See examples/cppunittest/XmlOutputterTest.cpp for document structure and usage. - Compiler compatible output : CompilerOutputter print the result in a compiler compatible format. You can use your IDE to jump to the first failure. See examples/cppunittest/CppUniTestMain.cpp for an example of usage. - Text output : replace the deprecated TextTestResult. Print the result in a human readable format. * NotEqualException constructor take an additional message (usually used to point out where the difference occured between the expected and actual value) that can be retreived with additionalMessage(). See Asserter documentation for an example of usage. * CppUnit - CppUnit can be compiled as a DLL (WIN32 platform). DLL can be generated by the cppunit_dll.dsp project. You must define the pre-processor symbol CPPUNIT_DLL when linking against CppUnit DLL. See cppunittests examples for an example. * TestRunner - Qt TestRunner : a test runner for the Qt library (http://www.trolltech.com). See examples/qt for an example of use. - MFC TestRunner : the dialog can now be resized. List view column sizes, as well as the dialog size, are saved. Unicode configurations have been added. * Deprecated - TextTestResult : use the test listener TextTestProgressListener and the ouputter TextOuputter instead. - Methods having fileName, lineNumber as parameter. Usually replaced by a similar method that take a SourceLine parameter. Exception and TestAssert are impacted. - TestRegistryFactory::registerFactory( const std::string &name, TestFactory *factory ). You must define the symbol CPPUNIT_ENABLE_SOURCELINE_DEPRECATED to enable old Exception constructor, UNKNOWNFILENAME and UNKNOWNLINENUMBER, as well as function defined in the TestAssert namespace. The exception construction and throwing as been moved to Asserter namespace. * Compatibility break: TestResult has been splitted in two class. TestResultCollector compatibility breaks refer to the methods that were previously in TestResult. - TestListener::addError() was removed. addFailure() is used to report any kind of failure. - TestResultCollector::errors() was removed. Use failures() instead. - TestResultCollector::failures() now reports all kind of failures. - TestResultCollector::failures() returns a const reference. - void TestListener::addFailure( TestFailure *failure ) was removed. - void TestListener::addError( TestFailure *failure ) signature changed. - CPPUNIT_ASSERT_EQUAL_MESSAGE: changed arguments order. 'message' is now the first argument instead of the last (like CPPUNIT_ASSERT_MESSAGE). Notes that CPPUNIT_ASSERT_EQUAL was introduced in release 1.7.3. - directory for TestRunners as moved from cppunitui/ to cppunit/ui/ (concern only users of release 1.7.10) * Bug fix: - test ExceptionTest.testAssignment() don't fail anymore on VC++. See FAQ for detail. |
From: Volker B. <vbo...@te...> - 2002-04-11 10:34:26
|
On Wed, 10 Apr 2002, Arlo Belshee wrote: > I've been using the boost libraries for a while, including their regexp > stuff. If you're looking for a regexp library, I'd recommend Boost's. I stumbled across the boost project searching for a regexp library but was pretty amazed that I never heard about this large and nice thing before. > In particular, it works well with STLPort, which means that the list of > currently supported platforms includes all Windows, Mac OS X, Mac OS > 6.something +, a few dozen Linux distros, most Unixes, Amiga, PS2, XBox, = and > so on. You don't have to worry about platform availability, although you = do > have to ensure that the developer installs the STLPort and Boost librarie= s. >=20 > Likewise, he boost regex was built with Unicode in mind. It performs all > matching using char_traits, so should internationalize as well as the res= t > of the STL (YMMV). It supports most digraphs, and matches umlauted, > accented, and otherwise modified characters correctly. I expect it to wor= k > with the Asian, Arabic and Hebrew languages, but don't really know. >=20 > Additionally, it uses a pretty full regex syntax, similar to Perl's. I > haven't found much missing, although the regex strings end up as even mor= e > line noise than they do in Perl, because you have to escape the backslash > character past the C++ processor any time that you put in an escape > sequence. Thank you for this evaluation! When I find the time I will implement an asserter using the boost-library and try to add the necessary autoconf stuff. As long as one makes the library selectable via configure this dependency should be acceptable I think. Regex matching would be an add-on and no basic functionality would depend on it. Regards, Volker --=20 Volker Boerchers <vbo...@te...> System Engineer TECON Systems AG, Perlengraben 2, 50676 K=F6ln, http://www.tecon.de Tel: +49-221-92007-55, Fax: +49-221-92007-77 |
From: Baptiste L. <gai...@fr...> - 2002-04-11 09:53:07
|
Is the AC_OUPUT thingy the list of Makefile to generate from Makefile.am ? Well, it's a go for 1.8.0. I'll try to make the release. I'd like to know If I got the procedure down. I'll let you know of any problem. Thansk Steve, Baptiste. ----- Original Message ----- From: "Steve M. Robbins" <ste...@vi...> To: "Baptiste Lepilleur" <gai...@fr...> Sent: Thursday, April 11, 2002 6:24 AM Subject: Re: [Cppunit-devel] New cppunit/ui directory and Makefile.am > On Wed, Apr 10, 2002 at 06:04:22PM +0200, Baptiste Lepilleur wrote: > > I attempted to update the Makefile.am in include/cppunit/ui directory to > > include that directory in the distribution, but It doesn't seems to work. > > Yeah, you've run into a fiddly bit of automakery. I just committed > the fixes. > > All the cppunit/ui headers got installed. I succeeded to build the > examples/cppunittest from installed headers & library. It looks > good to me! > > -S > > -- > by Rocket to the Moon, > by Airplane to the Rocket, > by Taxi to the Airport, > by Frontdoor to the Taxi, > by throwing back the blanket and laying down the legs ... > - They Might Be Giants > > |
From: Baptiste L. <gai...@fr...> - 2002-04-10 16:52:32
|
You can easily add your own assertion using Asserter. Look up the documentation menu 'module': creating you assertion. At the current time, I don't wish to introduce dependency uppon boost library (weird build system, and not has more portability problems than cppunit. Still a great lib, though.). Baptiste. ----- Original Message ----- From: "Volker Boerchers" <vbo...@te...> To: <cpp...@li...> Sent: Wednesday, April 10, 2002 9:04 AM Subject: [Cppunit-devel] regular expression match Hi, for quite a while now it has been a plan of mine to add some sort of regular expression support to cppunit. Whenever it gets to comparing strings it would often help to use regular expressions instead of exact string match. Often dynamic information is the problem. An example: I want to check the output of a logging server. Every message should have this format: <msg. sequence no.> <process id> <date> <time> <message> e.g. 2 15337 2002-04-05 09:44 server started With current cppunit I use shell scripts to check the output. With regular expressions it would be much easier, e.g. CPPUNIT_ASSERT_REGEX_MATCH("^\d+ \d+ 20\d{2}-\d{2}-\d{2}" "\d{2}:\d{2} server started", logline); (with perl style \d := [0-9]). But there might be some issues with using regular expressions in C++: - Although regular expression handling is part of the POSIX standard I don't know how portable it is. - The regex interface is somewhat more complicated than a simple string equality. There are a lot of switches and options controlling the type of match. But it should be *really simple* to use in cppunit. - There are some concurring regex implementation. On Debian Linux e.g. there are at least 5: glibc (libc/POSIX), libregex (GNU), libregexx (C++ wrapper for libregex), libboost (C++, maintained by well known Steve M. Robbins...), libpcre (perl style regex) I think, we should have at least one simple regex-assert, at least on some platforms that supports regexps. Perhaps we could have a requirement like this 'if you want to use regexps with cppunit you have to install libXXX otherwise they will be disabled' (the way cppunit deals with doxygen). I think this has some advantages: - One could use the 'best suited' library, e.g. a C++-library. - There might be less portability issues. Comments? Are there even any existing implementations of regex-asserts already? Best regards, Volker (BTW. regexps are still less than one could think of: In the example above there is no way to ensure that the timestamp is a valid date...) -- Volker Boerchers <vbo...@te...> System Engineer TECON Systems AG, Perlengraben 2, 50676 Köln, http://www.tecon.de Tel: +49-221-92007-55, Fax: +49-221-92007-77 _______________________________________________ Cppunit-devel mailing list Cpp...@li... https://lists.sourceforge.net/lists/listinfo/cppunit-devel |
From: Baptiste L. <gai...@fr...> - 2002-04-10 16:49:53
|
----- Original Message ----- From: "Steve M. Robbins" <ste...@vi...> To: "CppUnit Development" <cpp...@li...> Sent: Wednesday, April 10, 2002 2:45 PM Subject: Re: [Cppunit-devel] regular expression match > Hi, > > I haven't any real opinion on adding regular expression matching > to CppUnit. I presume one could always call their own favourite > regex matcher wrapped up in CPPUNIT_ASSERT without too much trouble. > > However, since you mentioned the BOOST libraries, I wonder if you have > looked at their implementations of concept checking and testing? The > web page (www.boost.org) indicates that there is not yet any unit test > library. The BOOST code is pretty well designed and the mailing list > is full of very bright people. So it would be a boon to have CppUnit > involved with them. > > I haven't looked at any of this stuff, myself. Has anyone else? I have used some of boost component (smart-pointer and regular expression). There is lot of interesting thing, but not always supported by all compiler (tuple is pretty much useless on VC++). I haven't looked to deep into the unit test (I tried to give it a look, but they are usually a large bunch of lines, pretty much unreadable for me.). Still, they test for memory leak. Baptiste. |
From: Baptiste L. <gai...@fr...> - 2002-04-10 16:10:23
|
I attempted to update the Makefile.am in include/cppunit/ui directory to include that directory in the distribution, but It doesn't seems to work. include/cppunit/ui/Makefile.am contains: SUBDIRS = text mfc qt and cppunit/ui/text/Makefile/am contains: libcppunitinclude_HEADERS = \ TestRunner.h make distcheck ends with: make[3]: Entering directory `/home/users/b/bl/blep/z/cppunit/include/cppunit/ext ensions' make[3]: Leaving directory `/home/users/b/bl/blep/z/cppunit/include/cppunit/exte nsions' make[3]: Entering directory `/home/users/b/bl/blep/z/cppunit/include/cppunit/ui' make[3]: *** No rule to make target `distdir'. Stop. make[3]: Leaving directory `/home/users/b/bl/blep/z/cppunit/include/cppunit/ui' make[2]: *** [distdir] Error 1 make[2]: Leaving directory `/home/users/b/bl/blep/z/cppunit/include/cppunit' make[1]: *** [distdir] Error 1 make[1]: Leaving directory `/home/users/b/bl/blep/z/cppunit/include' make: *** [distdir] Error 1 Anybody got any ideas ? Baptiste. |
From: Baptiste L. <gai...@fr...> - 2002-04-10 16:10:18
|
Look at CppUnit 1.7.10 documentation. The cookbook should be a good way to start. ----- Original Message ----- From: "durai" <dur...@na...> To: <cpp...@li...> Sent: Wednesday, April 10, 2002 10:30 AM Subject: [Cppunit-devel] hI > Hi! > > I'm quit new for Cppunit. can u give any book referece and sites for > Cppunit. > Raju. > > > _______________________________________________ > Cppunit-devel mailing list > Cpp...@li... > https://lists.sourceforge.net/lists/listinfo/cppunit-devel > |
From: Arlo B. <arl...@ho...> - 2002-04-10 16:01:30
|
I've been using the boost libraries for a while, including their regexp stuff. If you're looking for a regexp library, I'd recommend Boost's. In particular, it works well with STLPort, which means that the list of currently supported platforms includes all Windows, Mac OS X, Mac OS 6.something +, a few dozen Linux distros, most Unixes, Amiga, PS2, XBox, and so on. You don't have to worry about platform availability, although you do have to ensure that the developer installs the STLPort and Boost libraries. Likewise, he boost regex was built with Unicode in mind. It performs all matching using char_traits, so should internationalize as well as the rest of the STL (YMMV). It supports most digraphs, and matches umlauted, accented, and otherwise modified characters correctly. I expect it to work with the Asian, Arabic and Hebrew languages, but don't really know. Additionally, it uses a pretty full regex syntax, similar to Perl's. I haven't found much missing, although the regex strings end up as even more line noise than they do in Perl, because you have to escape the backslash character past the C++ processor any time that you put in an escape sequence. There is a learning curve on the boost regexp - it tries to expose a completely generalized interface, which leads to complexity. As most STL things, it defines algorithms that operates on ranges, which means that you can trivially use it to match not only on a string, but also on any container, on files directly, or an a wrapped stream (it requires on bi-directional iterators, so you can't just match on cin directly). However, this adds some complexity to its use - there are lots of results classes, templates, and syntactical garbage to keep track of. For the purposes of CppUnit, you are really only looking for a match / no match result, so you could easily wrap it all in a functor which returns a bool. Then a simple macro to assert on that, and voila. Note, however, the use of you in that sentence. Sorry guys, but I've got a ship date coming up at work, and won't be able to get around to just writing this for a while. Another option would be to have a family of such functors that use the various regex libraries, and have CppUnit select one based on what libs are installed on the developer's machine (either statically or dynamically). I don't know how feasible it would be to check for support on other platforms (haven't tried it), but it's trivial to tell whether Boost & STLPort are installed on a Window box, as they are both DLLs. In any case, static config is simple enough. I agree that it would be good to have these two projects become involved with each other. Note, however, that CppUnit isn't really architected in the way that they're planning to build the test library. Probably both sides will change on this one - as Steve pointed out, they don't have an implementation. Arlo > -----Original Message----- > From: cpp...@li... > > I haven't any real opinion on adding regular expression matching > to CppUnit. I presume one could always call their own favourite > regex matcher wrapped up in CPPUNIT_ASSERT without too much trouble. > > However, since you mentioned the BOOST libraries, I wonder if you have > looked at their implementations of concept checking and testing? The > web page (www.boost.org) indicates that there is not yet any unit test > library. The BOOST code is pretty well designed and the mailing list > is full of very bright people. So it would be a boon to have CppUnit > involved with them. > > I haven't looked at any of this stuff, myself. Has anyone else? |
From: Duane M. <dua...@ma...> - 2002-04-10 15:54:42
|
--- At Wed, 10 Apr 2002 08:45:39 -0400, Steve M. Robbins wrote: >Hi, > >I haven't any real opinion on adding regular expression matching >to CppUnit. I presume one could always call their own favourite >regex matcher wrapped up in CPPUNIT_ASSERT without too much trouble. > >However, since you mentioned the BOOST libraries, I wonder if you have >looked at their implementations of concept checking and testing? The >web page (www.boost.org) indicates that there is not yet any unit test >library. The BOOST code is pretty well designed and the mailing list >is full of very bright people. So it would be a boon to have CppUnit >involved with them. > >I haven't looked at any of this stuff, myself. Has anyone else? I am a subscriber of the boost users list <mailto:boost-users- sub...@ya...> or <http://www.boost.org>. Boost has a C++ regular expression interface as well as a unit test framework. The unit test framework has no relationship to CppUnit. I have mentioned it to the developer of the Boost framework with no real response. The present unit testing is buried in boost, I believe to test some of boost. But the intention is that it will eventually be something like CppUnit. I find this very disappointing as CppUnit is much farther along. I imagine that CppUnit could also benefit greatly from the input of the Boost group. As I understand it, the boost regular expression library is meant to be Perl compatible (although why not posix I am not sure). I believe boost may be working towards getting the regular expression library into the C++ standard library. Be aware that I have used neither of these libraries. ...Duane -- "If tyranny and oppression come to this land, it will be in the guise of fighting a foreign enemy." - James Madison |