[prev in list] [next in list] [prev in thread] [next in thread]
List: activemq-commits
Subject: svn commit: r1075339 - in
From: tabish () apache ! org
Date: 2011-02-28 14:16:29
Message-ID: 20110228141629.CE7E823888C2 () eris ! apache ! org
[Download RAW message or body]
Author: tabish
Date: Mon Feb 28 14:16:29 2011
New Revision: 1075339
URL: http://svn.apache.org/viewvc?rev=1075339&view=rev
Log:
merge fix for https://issues.apache.org/jira/browse/AMQCPP-352 with new tests to \
verify.
Modified:
activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/util/URISupport.cpp
activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/test/activemq/util/URISupportTest.cpp
Modified: activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/util/URISupport.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.2.x/ac \
tivemq-cpp/src/main/activemq/util/URISupport.cpp?rev=1075339&r1=1075338&r2=1075339&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/util/URISupport.cpp \
(original)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/main/activemq/util/URISupport.cpp \
Mon Feb 28 14:16:29 2011 @@ -347,7 +347,7 @@ StlList<std::string> URISupport::splitCo
break;
case ',':
if( depth == 0 ) {
- std::string s = str.substr( last, i );
+ std::string s = str.substr( last, i - last );
components.add( s );
last = i + 1;
}
Modified: activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/test/activemq/util/URISupportTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.2.x/ac \
tivemq-cpp/src/test/activemq/util/URISupportTest.cpp?rev=1075339&r1=1075338&r2=1075339&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/test/activemq/util/URISupportTest.cpp \
(original)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.2.x/activemq-cpp/src/test/activemq/util/URISupportTest.cpp \
Mon Feb 28 14:16:29 2011 @@ -193,4 +193,20 @@ void \
URISupportTest::testParseComposite( CPPUNIT_ASSERT( \
data.getComponents().get(0).toString() == "tcp://localhost:61616" );
+ data = URISupport::parseComposite(
+ URI( "test:(part1://host,part2://host,part3://host,part4://host)" ) );
+ CPPUNIT_ASSERT( 4 == data.getComponents().size() );
+ CPPUNIT_ASSERT( data.getComponents().get(0).toString() == "part1://host" );
+ CPPUNIT_ASSERT( data.getComponents().get(1).toString() == "part2://host" );
+ CPPUNIT_ASSERT( data.getComponents().get(2).toString() == "part3://host" );
+ CPPUNIT_ASSERT( data.getComponents().get(3).toString() == "part4://host" );
+
+ data = URISupport::parseComposite(
+ URI( "test:(part1://host,part2://host,part3://host,part4://host?option=value)" \
) ); + CPPUNIT_ASSERT( 4 == data.getComponents().size() );
+ CPPUNIT_ASSERT( data.getComponents().get(0).toString() == "part1://host" );
+ CPPUNIT_ASSERT( data.getComponents().get(1).toString() == "part2://host" );
+ CPPUNIT_ASSERT( data.getComponents().get(2).toString() == "part3://host" );
+ CPPUNIT_ASSERT( data.getComponents().get(3).toString() == \
"part4://host?option=value" ); +
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic