Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

svn commit: r591465 - in /logging/log4cxx/trunk/src/test/cpp/helpers: chars: msg#00000

apache.logging.log4cxx.devel

Subject: svn commit: r591465 - in /logging/log4cxx/trunk/src/test/cpp/helpers: charsetencodertestcase.cpp messagebuffertest.cpp

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>
Google Custom Search

Recently Viewed:
qplus.devel/200...    network.jabber....    debian.qa-packa...    encryption.gpg....    python.dabo.dev...    uclinux.devel/2...    science.mathema...    recreation.pesc...    kernel.ck/2004-...    mozilla.devel.e...    tex.latex.prosp...    ietf.multi6/200...    bbc.cvs/2002-11...    xfree86.newbie/...    jakarta.taglibs...    altlinux.hardwa...    comedi/2002-05/...    horde.bugs/2004...    games.diplomacy...    finance.e-gold....    web.dom.test-su...    lang.ruby.rails...    os.netbsd.devel...    video.gstreamer...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive 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

Navigation