|
|
| <prev next> |
Choosing A Webhost: |
svn commit: r591465 - in /logging/log4cxx/trunk/src/test/cpp/helpers: chars: msg#00000apache.logging.log4cxx.devel
Author: carnold Date: Fri Nov 2 14:17:59 2007 New Revision: 591465 URL: http://svn.apache.org/viewvc?rev=591465&view=rev Log: LOGCXX-175: Kludge for VC6's pre-standard for-loop scoping Modified: logging/log4cxx/trunk/src/test/cpp/helpers/charsetencodertestcase.cpp logging/log4cxx/trunk/src/test/cpp/helpers/messagebuffertest.cpp Modified: logging/log4cxx/trunk/src/test/cpp/helpers/charsetencodertestcase.cpp URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/test/cpp/helpers/charsetencodertestcase.cpp?rev=591465&r1=591464&r2=591465&view=diff ============================================================================== --- logging/log4cxx/trunk/src/test/cpp/helpers/charsetencodertestcase.cpp (original) +++ logging/log4cxx/trunk/src/test/cpp/helpers/charsetencodertestcase.cpp Fri Nov 2 14:17:59 2007 @@ -279,9 +279,9 @@ Thread threads[THREAD_COUNT]; CharsetEncoderPtr enc(CharsetEncoder::getEncoder(LOG4CXX_STR("ISO-8859-1"))); ThreadPackage* package = new ThreadPackage(enc, THREAD_REPS); - for(int i = 0; i < THREAD_COUNT; i++) { + { for(int i = 0; i < THREAD_COUNT; i++) { threads[i].run(thread1Action, package); - } + } } // // give time for all threads to be launched so // we don't signal before everybody is waiting. Modified: logging/log4cxx/trunk/src/test/cpp/helpers/messagebuffertest.cpp URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/test/cpp/helpers/messagebuffertest.cpp?rev=591465&r1=591464&r2=591465&view=diff ============================================================================== --- logging/log4cxx/trunk/src/test/cpp/helpers/messagebuffertest.cpp (original) +++ logging/log4cxx/trunk/src/test/cpp/helpers/messagebuffertest.cpp Fri Nov 2 14:17:59 2007 @@ -50,21 +50,33 @@ void testInsertCStr() { MessageBuffer buf; std::string greeting("Hello, World"); - CharMessageBuffer& retval = buf << "Hello" << ", World"; +#if LOG4CXX_SUPPORTS_MULTIPLE_OP_RETVAL + CharMessageBuffer& retval = buf << "Hello" << ", World"; +#else + std::ostream& retval = buf << "Hello" << ", World"; +#endif CPPUNIT_ASSERT_EQUAL(greeting, buf.str(retval)); } void testInsertString() { MessageBuffer buf; std::string greeting("Hello, World"); - CharMessageBuffer& retval = buf << std::string("Hello") << std::string(", World"); +#if LOG4CXX_SUPPORTS_MULTIPLE_OP_RETVAL + CharMessageBuffer& retval = buf << std::string("Hello") << std::string(", World"); +#else + std::ostream& retval = buf << std::string("Hello") << std::string(", World"); +#endif CPPUNIT_ASSERT_EQUAL(greeting, buf.str(retval)); } void testInsertNull() { MessageBuffer buf; std::string greeting("Hello, null"); +#if LOG4CXX_SUPPORTS_MULTIPLE_OP_RETVAL CharMessageBuffer& retval = buf << "Hello, " << (const char*) 0; +#else + std::ostream& retval = buf << "Hello, " << (const char*) 0; +#endif CPPUNIT_ASSERT_EQUAL(greeting, buf.str(retval)); }
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Next by Date: | svn commit: r591466 - /logging/log4cxx/trunk/src/test/cpp/asyncappendertestcase.cpp, carnold |
|---|---|
| Next by Thread: | svn commit: r591466 - /logging/log4cxx/trunk/src/test/cpp/asyncappendertestcase.cpp, carnold |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |