Re: [Cppunit-devel] Wrap Function in CompilerOutput
Brought to you by:
blep
From: Baptiste L. <gai...@fr...> - 2002-09-04 17:59:43
|
Sorry to say that, but this function has been rewritten a while ago (and gained a few UT on the way). It has moved to StringTools::wrap(). Check out the 1.9.10 tar ball and let me know if the issue still exist. Concerning a GUI for Borland C++, you may want to check out http://xprogramming.com/. There was a split based on the original version of CppUnit provided with a GUI. Though in my mind, post-build testing and test plug-ins pretty much remove the need for a GUI (haven't used one in over 4 months). Baptiste. ----- Original Message ----- From: "Phil Elliott" <Phi...@Ve...> To: <cpp...@li...> Sent: Wednesday, September 04, 2002 11:20 AM Subject: [Cppunit-devel] Wrap Function in CompilerOutput I have been testing the CPPUnit using C++Builder and have found a problem with the wrap function in that it does not print out the failure line correctly. This is smething to do with the std::string library and the way in which the constructor works. When constructing a string with the same name as a parameter there appears to be a conflict between the destruction and construction. To overcome this I gave the second use a different name and this corrected the problem. Here is a copy of the corrected code. std::string CompilerOutputter::wrap( std::string message ) { Lines lines = splitMessageIntoLines( message ); std::string wrapped; for ( Lines::iterator it = lines.begin(); it != lines.end(); ++it ) { std::string line( *it ); const int maxLineLength = 80; int index =0; while ( index < line.length() ) { std::string line2( line.substr( index, maxLineLength ) ); wrapped += line2; index += maxLineLength; if ( index < line.length() ) wrapped += "\n"; } wrapped += '\n'; } return wrapped; } I know that there has been development for MVC6, but do you know of any developments for a windows front end using C Builder, as I am currently using a console application. Like the functionality available. Phil Elliott. > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Phil Elliott > Development Manager > > VEMIS > Vehicle Telematics Solutions > > 18 Pebble Close Business Village, > Amington, Tamworth, Staffordshire, B77 4RD. > Tel : 01827 311912 Fax: 01827 311916 > Phi...@ve... www.vemis.com > > A DaimlerChrysler Company > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |