activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject activemq-cpp git commit: Clean up some formatting.
Date Tue, 28 Jul 2015 21:01:28 GMT
Repository: activemq-cpp
Updated Branches:
  refs/heads/master b7e418ebe -> da83ca6f3


Clean up some formatting.  

Project: http://git-wip-us.apache.org/repos/asf/activemq-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-cpp/commit/da83ca6f
Tree: http://git-wip-us.apache.org/repos/asf/activemq-cpp/tree/da83ca6f
Diff: http://git-wip-us.apache.org/repos/asf/activemq-cpp/diff/da83ca6f

Branch: refs/heads/master
Commit: da83ca6f3838028b24027dcd51419aaf0fa69aa1
Parents: b7e418e
Author: Timothy Bish <tabish121@gmail.com>
Authored: Tue Jul 28 17:01:04 2015 -0400
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Tue Jul 28 17:01:04 2015 -0400

----------------------------------------------------------------------
 .../activemq/test/SimpleRollbackTest.cpp        |  50 ++--
 .../activemq/test/SimpleRollbackTest.h          |   3 +-
 .../activemq/test/SimpleTest.cpp                | 277 +++++++++----------
 .../activemq/test/SlowListenerTest.cpp          |  46 ++-
 .../activemq/test/SlowListenerTest.h            |   2 +-
 .../activemq/test/TransactionTest.cpp           | 152 +++++-----
 .../activemq/test/TransactionTest.h             |   3 +-
 .../activemq/test/VirtualTopicTest.cpp          |  50 ++--
 .../activemq/test/VirtualTopicTest.h            |   2 +-
 9 files changed, 273 insertions(+), 312 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/da83ca6f/activemq-cpp/src/test-integration/activemq/test/SimpleRollbackTest.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/test-integration/activemq/test/SimpleRollbackTest.cpp b/activemq-cpp/src/test-integration/activemq/test/SimpleRollbackTest.cpp
index d534c90..3a11796 100644
--- a/activemq-cpp/src/test-integration/activemq/test/SimpleRollbackTest.cpp
+++ b/activemq-cpp/src/test-integration/activemq/test/SimpleRollbackTest.cpp
@@ -48,66 +48,66 @@ void SimpleRollbackTest::testRollbacks() {
     try {
 
         // Create CMS Object for Comms
-        cms::Session* session( cmsProvider->getSession() );
+        cms::Session* session(cmsProvider->getSession());
 
-        CMSListener listener( session );
+        CMSListener listener(session);
 
         cms::MessageConsumer* consumer = cmsProvider->getConsumer();
-        consumer->setMessageListener( &listener );
+        consumer->setMessageListener(&listener);
         cms::MessageProducer* producer = cmsProvider->getProducer();
-        producer->setDeliveryMode( DeliveryMode::NON_PERSISTENT );
+        producer->setDeliveryMode(DeliveryMode::NON_PERSISTENT);
 
-        auto_ptr<cms::TextMessage> txtMessage( session->createTextMessage() );
+        auto_ptr<cms::TextMessage> txtMessage(session->createTextMessage());
 
-        for( unsigned int i = 0; i < IntegrationCommon::defaultMsgCount; ++i ) {
+        for (unsigned int i = 0; i < IntegrationCommon::defaultMsgCount; ++i) {
             ostringstream lcStream;
             lcStream << "SimpleTest - Message #" << i << ends;
-            txtMessage->setText( lcStream.str() );
-            producer->send( txtMessage.get() );
+            txtMessage->setText(lcStream.str());
+            producer->send(txtMessage.get());
         }
 
         session->commit();
-        Thread::sleep( 50 );
+        Thread::sleep(50);
 
         // Wait for the messages to get here
-        listener.asyncWaitForMessages( IntegrationCommon::defaultMsgCount );
+        listener.asyncWaitForMessages(IntegrationCommon::defaultMsgCount);
         unsigned int numReceived = listener.getNumReceived();
-        CPPUNIT_ASSERT( numReceived == IntegrationCommon::defaultMsgCount );
+        CPPUNIT_ASSERT(numReceived == IntegrationCommon::defaultMsgCount);
 
         session->commit();
-        Thread::sleep( 50 );
+        Thread::sleep(50);
 
-        for( unsigned int i = 0; i < 5; ++i ) {
+        for (unsigned int i = 0; i < 5; ++i) {
             ostringstream lcStream;
             lcStream << "SimpleTest - Message #" << i << ends;
-            txtMessage->setText( lcStream.str() );
-            producer->send( txtMessage.get() );
+            txtMessage->setText(lcStream.str());
+            producer->send(txtMessage.get());
         }
 
         listener.reset();
         session->rollback();
-        Thread::sleep( 50 );
+        Thread::sleep(50);
 
         listener.reset();
-        txtMessage->setText( "SimpleTest - Message after Rollback" );
-        producer->send( txtMessage.get() );
+        txtMessage->setText("SimpleTest - Message after Rollback");
+        producer->send(txtMessage.get());
         session->commit();
 
         // Wait for the messages to get here
-        listener.asyncWaitForMessages( 1 );
-        CPPUNIT_ASSERT( listener.getNumReceived() == 1 );
+        listener.asyncWaitForMessages(1);
+        CPPUNIT_ASSERT(listener.getNumReceived() == 1);
 
         listener.reset();
-        txtMessage->setText( "SimpleTest - Message after Rollback" );
-        producer->send( txtMessage.get() );
+        txtMessage->setText("SimpleTest - Message after Rollback");
+        producer->send(txtMessage.get());
         session->commit();
 
         // Wait for the messages to get here
-        listener.asyncWaitForMessages( 1 );
-        CPPUNIT_ASSERT( listener.getNumReceived() == 1 );
+        listener.asyncWaitForMessages(1);
+        CPPUNIT_ASSERT(listener.getNumReceived() == 1);
         session->commit();
 
-    } catch( std::exception& ex ) {
+    } catch (std::exception& ex) {
         std::cout << ex.what() << std::endl;
         throw ex;
     }

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/da83ca6f/activemq-cpp/src/test-integration/activemq/test/SimpleRollbackTest.h
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/test-integration/activemq/test/SimpleRollbackTest.h b/activemq-cpp/src/test-integration/activemq/test/SimpleRollbackTest.h
index 2608646..16aa814 100644
--- a/activemq-cpp/src/test-integration/activemq/test/SimpleRollbackTest.h
+++ b/activemq-cpp/src/test-integration/activemq/test/SimpleRollbackTest.h
@@ -32,8 +32,7 @@ namespace test{
         virtual ~SimpleRollbackTest();
 
         virtual void setUp() {
-            cmsProvider.reset(
-                new util::CMSProvider( getBrokerURL(), cms::Session::SESSION_TRANSACTED ) );
+            cmsProvider.reset(new util::CMSProvider(getBrokerURL(), cms::Session::SESSION_TRANSACTED));
         };
 
         virtual void testRollbacks();

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/da83ca6f/activemq-cpp/src/test-integration/activemq/test/SimpleTest.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/test-integration/activemq/test/SimpleTest.cpp b/activemq-cpp/src/test-integration/activemq/test/SimpleTest.cpp
index 633742d..e5e9fdb 100644
--- a/activemq-cpp/src/test-integration/activemq/test/SimpleTest.cpp
+++ b/activemq-cpp/src/test-integration/activemq/test/SimpleTest.cpp
@@ -40,175 +40,169 @@ using namespace decaf::util;
 void SimpleTest::testAutoAck() {
 
     // Create CMS Object for Comms
-    cms::Session* session( cmsProvider->getSession() );
+    cms::Session* session(cmsProvider->getSession());
 
-    CMSListener listener( session );
+    CMSListener listener(session);
 
     cms::MessageConsumer* consumer = cmsProvider->getConsumer();
-    consumer->setMessageListener( &listener );
+    consumer->setMessageListener(&listener);
     cms::MessageProducer* producer = cmsProvider->getProducer();
-    producer->setDeliveryMode( DeliveryMode::NON_PERSISTENT );
+    producer->setDeliveryMode(DeliveryMode::NON_PERSISTENT);
 
-    auto_ptr<cms::TextMessage> txtMessage( session->createTextMessage( "TEST MESSAGE" ) );
-    auto_ptr<cms::BytesMessage> bytesMessage( session->createBytesMessage() );
+    auto_ptr<cms::TextMessage> txtMessage(session->createTextMessage("TEST MESSAGE"));
+    auto_ptr<cms::BytesMessage> bytesMessage(session->createBytesMessage());
 
-    for( unsigned int i = 0; i < IntegrationCommon::defaultMsgCount; ++i ) {
-        producer->send( txtMessage.get() );
+    for (unsigned int i = 0; i < IntegrationCommon::defaultMsgCount; ++i) {
+        producer->send(txtMessage.get());
     }
 
-    for( unsigned int i = 0; i < IntegrationCommon::defaultMsgCount; ++i ) {
-        producer->send( bytesMessage.get() );
+    for (unsigned int i = 0; i < IntegrationCommon::defaultMsgCount; ++i) {
+        producer->send(bytesMessage.get());
     }
 
     // Wait for the messages to get here
-    listener.asyncWaitForMessages( IntegrationCommon::defaultMsgCount * 2 );
+    listener.asyncWaitForMessages(IntegrationCommon::defaultMsgCount * 2);
 
     unsigned int numReceived = listener.getNumReceived();
-    CPPUNIT_ASSERT( numReceived == IntegrationCommon::defaultMsgCount * 2 );
+    CPPUNIT_ASSERT(numReceived == IntegrationCommon::defaultMsgCount * 2);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 void SimpleTest::testClientAck() {
 
-    cmsProvider->setAckMode( cms::Session::CLIENT_ACKNOWLEDGE );
+    cmsProvider->setAckMode(cms::Session::CLIENT_ACKNOWLEDGE);
     cmsProvider->reconnectSession();
 
     // Create CMS Object for Comms
-    cms::Session* session( cmsProvider->getSession() );
+    cms::Session* session(cmsProvider->getSession());
 
-    CMSListener listener( session );
+    CMSListener listener(session);
 
     cms::MessageConsumer* consumer = cmsProvider->getConsumer();
-    consumer->setMessageListener( &listener );
+    consumer->setMessageListener(&listener);
     cms::MessageProducer* producer = cmsProvider->getProducer();
-    producer->setDeliveryMode( DeliveryMode::NON_PERSISTENT );
+    producer->setDeliveryMode(DeliveryMode::NON_PERSISTENT);
 
-    auto_ptr<cms::TextMessage> txtMessage( session->createTextMessage( "TEST MESSAGE" ) );
-    auto_ptr<cms::BytesMessage> bytesMessage( session->createBytesMessage() );
+    auto_ptr<cms::TextMessage> txtMessage(session->createTextMessage("TEST MESSAGE"));
+    auto_ptr<cms::BytesMessage> bytesMessage(session->createBytesMessage());
 
-    for( unsigned int i = 0; i < IntegrationCommon::defaultMsgCount; ++i ) {
-        producer->send( txtMessage.get() );
+    for (unsigned int i = 0; i < IntegrationCommon::defaultMsgCount; ++i) {
+        producer->send(txtMessage.get());
     }
 
-    for( unsigned int i = 0; i < IntegrationCommon::defaultMsgCount; ++i ) {
-        producer->send( bytesMessage.get() );
+    for (unsigned int i = 0; i < IntegrationCommon::defaultMsgCount; ++i) {
+        producer->send(bytesMessage.get());
     }
 
     // Wait for the messages to get here
-    listener.asyncWaitForMessages( IntegrationCommon::defaultMsgCount * 2 );
+    listener.asyncWaitForMessages(IntegrationCommon::defaultMsgCount * 2);
 
     unsigned int numReceived = listener.getNumReceived();
-    CPPUNIT_ASSERT( numReceived == IntegrationCommon::defaultMsgCount * 2 );
+    CPPUNIT_ASSERT(numReceived == IntegrationCommon::defaultMsgCount * 2);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 void SimpleTest::testProducerWithNullDestination() {
 
     // Create CMS Object for Comms
-    cms::Session* session( cmsProvider->getSession() );
+    cms::Session* session(cmsProvider->getSession());
 
-    CMSListener listener( session );
+    CMSListener listener(session);
 
     cms::MessageConsumer* consumer = cmsProvider->getConsumer();
-    consumer->setMessageListener( &listener );
+    consumer->setMessageListener(&listener);
     cms::MessageProducer* producer = cmsProvider->getNoDestProducer();
-    producer->setDeliveryMode( DeliveryMode::NON_PERSISTENT );
+    producer->setDeliveryMode(DeliveryMode::NON_PERSISTENT);
 
-    auto_ptr<cms::TextMessage> txtMessage( session->createTextMessage( "TEST MESSAGE" ) );
+    auto_ptr<cms::TextMessage> txtMessage(session->createTextMessage("TEST MESSAGE"));
 
-    producer->send( cmsProvider->getDestination(), txtMessage.get() );
+    producer->send(cmsProvider->getDestination(), txtMessage.get());
 
     // Wait for the messages to get here
-    listener.asyncWaitForMessages( 1 );
+    listener.asyncWaitForMessages(1);
 
     unsigned int numReceived = listener.getNumReceived();
-    CPPUNIT_ASSERT( numReceived == 1 );
+    CPPUNIT_ASSERT(numReceived == 1);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 void SimpleTest::testProducerSendWithNullDestination() {
 
     // Create CMS Object for Comms
-    cms::Session* session( cmsProvider->getSession() );
+    cms::Session* session(cmsProvider->getSession());
 
-    CMSListener listener( session );
+    CMSListener listener(session);
 
     cms::MessageProducer* producer = cmsProvider->getProducer();
-    producer->setDeliveryMode( DeliveryMode::NON_PERSISTENT );
+    producer->setDeliveryMode(DeliveryMode::NON_PERSISTENT);
 
-    auto_ptr<cms::TextMessage> txtMessage( session->createTextMessage( "TEST MESSAGE" ) );
+    auto_ptr<cms::TextMessage> txtMessage(session->createTextMessage("TEST MESSAGE"));
 
-    CPPUNIT_ASSERT_THROW_MESSAGE(
-        "Should Throw an InvalidDestinationException",
-        producer->send( NULL, txtMessage.get() ),
-        cms::InvalidDestinationException );
+    CPPUNIT_ASSERT_THROW_MESSAGE("Should Throw an InvalidDestinationException",
+        producer->send( NULL, txtMessage.get() ), cms::InvalidDestinationException);
 
     producer = cmsProvider->getNoDestProducer();
-    producer->setDeliveryMode( DeliveryMode::NON_PERSISTENT );
+    producer->setDeliveryMode(DeliveryMode::NON_PERSISTENT);
 
-    CPPUNIT_ASSERT_THROW_MESSAGE(
-        "Should Throw an UnsupportedOperationException",
-        producer->send( NULL, txtMessage.get() ),
-        cms::UnsupportedOperationException );
+    CPPUNIT_ASSERT_THROW_MESSAGE("Should Throw an UnsupportedOperationException",
+        producer->send( NULL, txtMessage.get() ), cms::UnsupportedOperationException);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 void SimpleTest::testProducerSendToNonDefaultDestination() {
 
     // Create CMS Object for Comms
-    cms::Session* session( cmsProvider->getSession() );
+    cms::Session* session(cmsProvider->getSession());
 
-    CMSListener listener( session );
+    CMSListener listener(session);
 
     cms::MessageProducer* producer = cmsProvider->getProducer();
-    producer->setDeliveryMode( DeliveryMode::NON_PERSISTENT );
+    producer->setDeliveryMode(DeliveryMode::NON_PERSISTENT);
 
-    auto_ptr<cms::TextMessage> txtMessage( session->createTextMessage( "TEST MESSAGE" ) );
-    auto_ptr<cms::Destination> destination( session->createTemporaryTopic() );
+    auto_ptr<cms::TextMessage> txtMessage(session->createTextMessage("TEST MESSAGE"));
+    auto_ptr<cms::Destination> destination(session->createTemporaryTopic());
 
-    CPPUNIT_ASSERT_THROW_MESSAGE(
-        "Should Throw an UnsupportedOperationException",
-        producer->send( destination.get(), txtMessage.get() ),
-        cms::UnsupportedOperationException );
+    CPPUNIT_ASSERT_THROW_MESSAGE("Should Throw an UnsupportedOperationException",
+        producer->send(destination.get(), txtMessage.get()), cms::UnsupportedOperationException);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 void SimpleTest::testSyncReceive() {
 
     // Create CMS Object for Comms
-    cms::Session* session( cmsProvider->getSession() );
+    cms::Session* session(cmsProvider->getSession());
     cms::MessageConsumer* consumer = cmsProvider->getConsumer();
     cms::MessageProducer* producer = cmsProvider->getProducer();
-    producer->setDeliveryMode( DeliveryMode::NON_PERSISTENT );
+    producer->setDeliveryMode(DeliveryMode::NON_PERSISTENT);
 
-    auto_ptr<cms::TextMessage> txtMessage( session->createTextMessage( "TEST MESSAGE" ) );
+    auto_ptr<cms::TextMessage> txtMessage(session->createTextMessage("TEST MESSAGE"));
 
     // Send some text messages
-    producer->send( txtMessage.get() );
+    producer->send(txtMessage.get());
 
-    auto_ptr<cms::Message> message( consumer->receive( 2000 ) );
-    CPPUNIT_ASSERT( message.get() != NULL );
+    auto_ptr<cms::Message> message(consumer->receive(2000));
+    CPPUNIT_ASSERT(message.get() != NULL);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 void SimpleTest::testSyncReceiveClientAck() {
 
-    cmsProvider->setAckMode( cms::Session::CLIENT_ACKNOWLEDGE );
+    cmsProvider->setAckMode(cms::Session::CLIENT_ACKNOWLEDGE);
     cmsProvider->reconnectSession();
 
     // Create CMS Object for Comms
-    cms::Session* session( cmsProvider->getSession() );
+    cms::Session* session(cmsProvider->getSession());
     cms::MessageConsumer* consumer = cmsProvider->getConsumer();
     cms::MessageProducer* producer = cmsProvider->getProducer();
-    producer->setDeliveryMode( DeliveryMode::NON_PERSISTENT );
+    producer->setDeliveryMode(DeliveryMode::NON_PERSISTENT);
 
-    auto_ptr<cms::TextMessage> txtMessage( session->createTextMessage( "TEST MESSAGE" ) );
+    auto_ptr<cms::TextMessage> txtMessage(session->createTextMessage("TEST MESSAGE"));
 
     // Send some text messages
-    producer->send( txtMessage.get() );
+    producer->send(txtMessage.get());
 
-    auto_ptr<cms::Message> message( consumer->receive( 2000 ) );
-    CPPUNIT_ASSERT( message.get() != NULL );
+    auto_ptr<cms::Message> message(consumer->receive(2000));
+    CPPUNIT_ASSERT(message.get() != NULL);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -216,35 +210,35 @@ void SimpleTest::testMultipleConnections() {
 
     // Create CMS Object for Comms
     auto_ptr<ActiveMQConnectionFactory> factory(new ActiveMQConnectionFactory(cmsProvider->getBrokerURL()));
-    auto_ptr<cms::Connection> connection1( factory->createConnection() );
+    auto_ptr<cms::Connection> connection1(factory->createConnection());
     connection1->start();
 
-    auto_ptr<cms::Connection> connection2( factory->createConnection() );
+    auto_ptr<cms::Connection> connection2(factory->createConnection());
     connection2->start();
 
-    CPPUNIT_ASSERT( connection1->getClientID() != connection2->getClientID() );
+    CPPUNIT_ASSERT(connection1->getClientID() != connection2->getClientID());
 
-    auto_ptr<cms::Session> session1( connection1->createSession() );
-    auto_ptr<cms::Session> session2( connection1->createSession() );
+    auto_ptr<cms::Session> session1(connection1->createSession());
+    auto_ptr<cms::Session> session2(connection1->createSession());
 
-    auto_ptr<cms::Topic> topic( session1->createTopic( UUID::randomUUID().toString() ) );
+    auto_ptr<cms::Topic> topic(session1->createTopic(UUID::randomUUID().toString()));
 
-    auto_ptr<cms::MessageConsumer> consumer1( session1->createConsumer( topic.get() ) );
-    auto_ptr<cms::MessageConsumer> consumer2( session2->createConsumer( topic.get() ) );
+    auto_ptr<cms::MessageConsumer> consumer1(session1->createConsumer(topic.get()));
+    auto_ptr<cms::MessageConsumer> consumer2(session2->createConsumer(topic.get()));
 
-    auto_ptr<cms::MessageProducer> producer( session2->createProducer( topic.get() ) );
-    producer->setDeliveryMode( DeliveryMode::NON_PERSISTENT );
+    auto_ptr<cms::MessageProducer> producer(session2->createProducer(topic.get()));
+    producer->setDeliveryMode(DeliveryMode::NON_PERSISTENT);
 
-    auto_ptr<cms::TextMessage> textMessage( session2->createTextMessage() );
+    auto_ptr<cms::TextMessage> textMessage(session2->createTextMessage());
 
     // Send some text messages
-    producer->send( textMessage.get() );
+    producer->send(textMessage.get());
 
-    auto_ptr<cms::Message> message( consumer1->receive( 2000 ) );
-    CPPUNIT_ASSERT( message.get() != NULL );
+    auto_ptr<cms::Message> message(consumer1->receive(2000));
+    CPPUNIT_ASSERT(message.get() != NULL);
 
-    message.reset( consumer2->receive( 2000 ) );
-    CPPUNIT_ASSERT( message.get() != NULL );
+    message.reset(consumer2->receive(2000));
+    CPPUNIT_ASSERT(message.get() != NULL);
 
     // Clean up if we can
     consumer1->close();
@@ -253,34 +247,34 @@ void SimpleTest::testMultipleConnections() {
     session1->close();
     session2->close();
 
-    this->cmsProvider->destroyDestination( topic.get() );
+    this->cmsProvider->destroyDestination(topic.get());
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 void SimpleTest::testMultipleSessions() {
 
     // Create CMS Object for Comms
-    auto_ptr<cms::Session> session1( cmsProvider->getConnection()->createSession() );
-    auto_ptr<cms::Session> session2( cmsProvider->getConnection()->createSession() );
+    auto_ptr<cms::Session> session1(cmsProvider->getConnection()->createSession());
+    auto_ptr<cms::Session> session2(cmsProvider->getConnection()->createSession());
 
-    auto_ptr<cms::Topic> topic( session1->createTopic( UUID::randomUUID().toString() ) );
+    auto_ptr<cms::Topic> topic(session1->createTopic(UUID::randomUUID().toString()));
 
-    auto_ptr<cms::MessageConsumer> consumer1( session1->createConsumer( topic.get() ) );
-    auto_ptr<cms::MessageConsumer> consumer2( session2->createConsumer( topic.get() ) );
+    auto_ptr<cms::MessageConsumer> consumer1(session1->createConsumer(topic.get()));
+    auto_ptr<cms::MessageConsumer> consumer2(session2->createConsumer(topic.get()));
 
-    auto_ptr<cms::MessageProducer> producer( session2->createProducer( topic.get() ) );
-    producer->setDeliveryMode( DeliveryMode::NON_PERSISTENT );
+    auto_ptr<cms::MessageProducer> producer(session2->createProducer(topic.get()));
+    producer->setDeliveryMode(DeliveryMode::NON_PERSISTENT);
 
-    auto_ptr<cms::TextMessage> textMessage( session2->createTextMessage() );
+    auto_ptr<cms::TextMessage> textMessage(session2->createTextMessage());
 
     // Send some text messages
-    producer->send( textMessage.get() );
+    producer->send(textMessage.get());
 
-    auto_ptr<cms::Message> message( consumer1->receive( 2000 ) );
-    CPPUNIT_ASSERT( message.get() != NULL );
+    auto_ptr<cms::Message> message(consumer1->receive(2000));
+    CPPUNIT_ASSERT(message.get() != NULL);
 
-    message.reset( consumer2->receive( 2000 ) );
-    CPPUNIT_ASSERT( message.get() != NULL );
+    message.reset(consumer2->receive(2000));
+    CPPUNIT_ASSERT(message.get() != NULL);
 
     // Clean up if we can
     consumer1->close();
@@ -289,7 +283,7 @@ void SimpleTest::testMultipleSessions() {
     session1->close();
     session2->close();
 
-    this->cmsProvider->destroyDestination( topic.get() );
+    this->cmsProvider->destroyDestination(topic.get());
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -314,7 +308,7 @@ void SimpleTest::testReceiveAlreadyInQueue() {
     connection->start();
 
     auto_ptr<cms::Message> message(consumer->receive(2000));
-    CPPUNIT_ASSERT( message.get() != NULL );
+    CPPUNIT_ASSERT(message.get() != NULL);
 
     // Clean up if we can
     consumer->close();
@@ -328,21 +322,21 @@ void SimpleTest::testReceiveAlreadyInQueue() {
 void SimpleTest::testQuickCreateAndDestroy() {
 
     auto_ptr<ActiveMQConnectionFactory> factory(new ActiveMQConnectionFactory(cmsProvider->getBrokerURL()));
-    auto_ptr<cms::Connection> connection( factory->createConnection() );
-    auto_ptr<cms::Session> session( connection->createSession() );
+    auto_ptr<cms::Connection> connection(factory->createConnection());
+    auto_ptr<cms::Session> session(connection->createSession());
 
-    session.reset( NULL );
-    connection.reset( NULL );
+    session.reset( NULL);
+    connection.reset( NULL);
 
-    connection.reset( factory->createConnection() );
-    session.reset( connection->createSession() );
+    connection.reset(factory->createConnection());
+    session.reset(connection->createSession());
     connection->start();
 
-    session.reset( NULL );
-    connection.reset( NULL );
+    session.reset( NULL);
+    connection.reset( NULL);
 
-    for( int i = 0; i < 50; ++i ) {
-        CMSProvider lcmsProvider( this->getBrokerURL() );
+    for (int i = 0; i < 50; ++i) {
+        CMSProvider lcmsProvider(this->getBrokerURL());
         lcmsProvider.getSession();
         lcmsProvider.getConsumer();
         lcmsProvider.getProducer();
@@ -367,42 +361,36 @@ void SimpleTest::testBytesMessageSendRecv() {
     bytesMessage->writeString("TEST-STRING");
 
     // Send some text messages
-    producer->send( bytesMessage.get() );
+    producer->send(bytesMessage.get());
 
-    auto_ptr<cms::Message> message( consumer->receive( 2000 ) );
-    CPPUNIT_ASSERT( message.get() != NULL );
+    auto_ptr<cms::Message> message(consumer->receive(2000));
+    CPPUNIT_ASSERT(message.get() != NULL);
 
-    CPPUNIT_ASSERT_THROW_MESSAGE(
-        "Should throw an ActiveMQExceptio",
-        message->setStringProperty( "FOO", "BAR" ),
-        cms::CMSException );
+    CPPUNIT_ASSERT_THROW_MESSAGE("Should throw an ActiveMQExceptio", message->setStringProperty("FOO", "BAR"), cms::CMSException);
 
-    BytesMessage* bytesMessage2 = dynamic_cast<cms::BytesMessage*>( message.get() );
-    CPPUNIT_ASSERT( bytesMessage2 != NULL );
-    CPPUNIT_ASSERT_THROW_MESSAGE(
-        "Should throw an ActiveMQExceptio",
-        bytesMessage2->writeBoolean( false ),
-        cms::CMSException );
+    BytesMessage* bytesMessage2 = dynamic_cast<cms::BytesMessage*>(message.get());
+    CPPUNIT_ASSERT(bytesMessage2 != NULL);
+    CPPUNIT_ASSERT_THROW_MESSAGE("Should throw an ActiveMQExceptio", bytesMessage2->writeBoolean(false), cms::CMSException);
 
-    CPPUNIT_ASSERT( bytesMessage2->getBodyLength() > 0 );
+    CPPUNIT_ASSERT(bytesMessage2->getBodyLength() > 0);
 
     unsigned char* result = bytesMessage2->getBodyBytes();
-    CPPUNIT_ASSERT( result != NULL );
-    delete [] result;
+    CPPUNIT_ASSERT(result != NULL);
+    delete[] result;
 
     bytesMessage2->reset();
 
-    CPPUNIT_ASSERT( bytesMessage2->readBoolean() == true );
-    CPPUNIT_ASSERT( bytesMessage2->readByte() == 127 );
-    CPPUNIT_ASSERT( bytesMessage2->readDouble() == 123456.789 );
-    CPPUNIT_ASSERT( bytesMessage2->readInt() == 65537 );
-    CPPUNIT_ASSERT( bytesMessage2->readString() == "TEST-STRING" );
+    CPPUNIT_ASSERT(bytesMessage2->readBoolean() == true);
+    CPPUNIT_ASSERT(bytesMessage2->readByte() == 127);
+    CPPUNIT_ASSERT(bytesMessage2->readDouble() == 123456.789);
+    CPPUNIT_ASSERT(bytesMessage2->readInt() == 65537);
+    CPPUNIT_ASSERT(bytesMessage2->readString() == "TEST-STRING");
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 namespace {
 
-    class Listener : public cms::MessageListener {
+    class Listener: public cms::MessageListener {
     private:
 
         bool passed;
@@ -422,25 +410,24 @@ namespace {
             return triggered;
         }
 
-        void onMessage( const cms::Message* message ) {
+        void onMessage(const cms::Message* message) {
             try {
                 triggered = true;
-                const BytesMessage* bytesMessage = dynamic_cast<const cms::BytesMessage*>( message );
+                const BytesMessage* bytesMessage = dynamic_cast<const cms::BytesMessage*>(message);
 
-                CPPUNIT_ASSERT( bytesMessage != NULL );
-                CPPUNIT_ASSERT( bytesMessage->getBodyLength() > 0 );
+                CPPUNIT_ASSERT(bytesMessage != NULL);
+                CPPUNIT_ASSERT(bytesMessage->getBodyLength() > 0);
 
                 unsigned char* result = bytesMessage->getBodyBytes();
-                CPPUNIT_ASSERT( result != NULL );
-                delete [] result;
+                CPPUNIT_ASSERT(result != NULL);
+                delete[] result;
 
                 passed = true;
-            } catch(...) {
+            } catch (...) {
                 passed = false;
             }
         }
     };
-
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -451,7 +438,7 @@ void SimpleTest::testBytesMessageSendRecvAsync() {
     // Create CMS Object for Comms
     cms::Session* session(cmsProvider->getSession());
     cms::MessageConsumer* consumer = cmsProvider->getConsumer();
-    consumer->setMessageListener( &listener );
+    consumer->setMessageListener(&listener);
     cms::MessageProducer* producer = cmsProvider->getProducer();
     producer->setDeliveryMode(DeliveryMode::NON_PERSISTENT);
 
@@ -464,14 +451,14 @@ void SimpleTest::testBytesMessageSendRecvAsync() {
     bytesMessage->writeString("TEST-STRING");
 
     // Send some text messages
-    producer->send( bytesMessage.get() );
+    producer->send(bytesMessage.get());
 
     int count = 0;
     while (!listener.isTriggered() && count++ < 30) {
         decaf::lang::Thread::sleep(100);
     }
 
-    CPPUNIT_ASSERT( listener.isPassed() );
+    CPPUNIT_ASSERT(listener.isPassed());
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -480,11 +467,11 @@ void SimpleTest::testLibraryInitShutdownInit() {
     {
         this->tearDown();
         // Shutdown the ActiveMQ library
-        CPPUNIT_ASSERT_NO_THROW( activemq::library::ActiveMQCPP::shutdownLibrary() );
+        CPPUNIT_ASSERT_NO_THROW(activemq::library::ActiveMQCPP::shutdownLibrary());
     }
     {
         // Initialize the ActiveMQ library
-        CPPUNIT_ASSERT_NO_THROW( activemq::library::ActiveMQCPP::initializeLibrary() );
+        CPPUNIT_ASSERT_NO_THROW(activemq::library::ActiveMQCPP::initializeLibrary());
         cmsProvider.reset(new util::CMSProvider(getBrokerURL()));
     }
 }

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/da83ca6f/activemq-cpp/src/test-integration/activemq/test/SlowListenerTest.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/test-integration/activemq/test/SlowListenerTest.cpp b/activemq-cpp/src/test-integration/activemq/test/SlowListenerTest.cpp
index a7fbc00..b333c1e 100644
--- a/activemq-cpp/src/test-integration/activemq/test/SlowListenerTest.cpp
+++ b/activemq-cpp/src/test-integration/activemq/test/SlowListenerTest.cpp
@@ -39,7 +39,7 @@ using namespace decaf::util::concurrent;
 namespace activemq{
 namespace test{
 
-    class SlowListener: public cms::MessageListener {
+    class SlowListener : public cms::MessageListener {
     public:
 
         unsigned int count;
@@ -48,14 +48,14 @@ namespace test{
         SlowListener() : MessageListener(), count(0), threadIds() {}
         virtual ~SlowListener() {}
 
-        void onMessage( const cms::Message* message ) {
+        void onMessage(const cms::Message* message) {
 
             synchronized( &threadIds ) {
                 count++;
-                threadIds.add( Thread::currentThread()->getId() );
+                threadIds.add(Thread::currentThread()->getId());
             }
 
-            Thread::sleep( 20 );
+            Thread::sleep(20);
         }
     };
 
@@ -71,61 +71,59 @@ void SlowListenerTest::testSlowListener() {
         cms::Session* session = cmsProvider->getSession();
 
         cms::MessageProducer* producer = cmsProvider->getProducer();
-        producer->setDeliveryMode( DeliveryMode::NON_PERSISTENT );
+        producer->setDeliveryMode(DeliveryMode::NON_PERSISTENT);
 
         const unsigned int numConsumers = 5;
         cms::MessageConsumer* consumers[numConsumers];
 
         // Create several consumers for the same destination.
-        for( unsigned int i = 0; i < numConsumers; i++ ) {
-            consumers[i] = session->createConsumer( cmsProvider->getDestination() );
-            consumers[i]->setMessageListener( &listener );
+        for (unsigned int i = 0; i < numConsumers; i++) {
+            consumers[i] = session->createConsumer(cmsProvider->getDestination());
+            consumers[i]->setMessageListener(&listener);
         }
 
-        auto_ptr<cms::BytesMessage> message( session->createBytesMessage() );
+        auto_ptr<cms::BytesMessage> message(session->createBytesMessage());
 
         unsigned int msgCount = 50;
-        for( unsigned int i = 0; i < msgCount; i++ ) {
-            producer->send( message.get() );
+        for (unsigned int i = 0; i < msgCount; i++) {
+            producer->send(message.get());
         }
 
         // Wait no more than 10 seconds for all the messages to come in.
-        waitForMessages( msgCount * numConsumers, 10000, &listener );
-
-        synchronized( &listener.threadIds ) {
+        waitForMessages(msgCount * numConsumers, 10000, &listener);
 
+        synchronized(&listener.threadIds) {
             // Make sure that the listener was always accessed by the same thread
             // and that it received all the messages from all consumers.
-            CPPUNIT_ASSERT_EQUAL( 1, (int)listener.threadIds.size() );
-            CPPUNIT_ASSERT_EQUAL( (msgCount * numConsumers), listener.count );
+            CPPUNIT_ASSERT_EQUAL(1, (int )listener.threadIds.size());
+            CPPUNIT_ASSERT_EQUAL((msgCount * numConsumers), listener.count);
         }
 
-        for( unsigned int i = 0; i < numConsumers; i++ ) {
+        for (unsigned int i = 0; i < numConsumers; i++) {
             delete consumers[i];
         }
 
-    } catch( ActiveMQException& ex ) {
+    } catch (ActiveMQException& ex) {
         ex.printStackTrace();
         throw ex;
     }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void SlowListenerTest::waitForMessages(
-    unsigned int count, long long maxWaitTime, SlowListener* l ) {
+void SlowListenerTest::waitForMessages(unsigned int count, long long maxWaitTime, SlowListener* l) {
 
     long long startTime = System::currentTimeMillis();
 
-    synchronized( &( l->threadIds ) ) {
+    synchronized(&(l->threadIds)) {
 
-        while( l->count < count ) {
+        while (l->count < count) {
 
             long long curTime = System::currentTimeMillis();
-            if( ( curTime - startTime ) >= maxWaitTime ) {
+            if ((curTime - startTime) >= maxWaitTime) {
                 return;
             }
 
-            l->threadIds.wait( 500 );
+            l->threadIds.wait(500);
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/da83ca6f/activemq-cpp/src/test-integration/activemq/test/SlowListenerTest.h
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/test-integration/activemq/test/SlowListenerTest.h b/activemq-cpp/src/test-integration/activemq/test/SlowListenerTest.h
index f237bc4..5aedd06 100644
--- a/activemq-cpp/src/test-integration/activemq/test/SlowListenerTest.h
+++ b/activemq-cpp/src/test-integration/activemq/test/SlowListenerTest.h
@@ -41,7 +41,7 @@ namespace test{
 
     protected:
 
-        void waitForMessages( unsigned int count, long long maxWaitTime, SlowListener* listener );
+        void waitForMessages(unsigned int count, long long maxWaitTime, SlowListener* listener);
 
     };
 

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/da83ca6f/activemq-cpp/src/test-integration/activemq/test/TransactionTest.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/test-integration/activemq/test/TransactionTest.cpp b/activemq-cpp/src/test-integration/activemq/test/TransactionTest.cpp
index 1b2a779..a731b97 100644
--- a/activemq-cpp/src/test-integration/activemq/test/TransactionTest.cpp
+++ b/activemq-cpp/src/test-integration/activemq/test/TransactionTest.cpp
@@ -48,37 +48,29 @@ void TransactionTest::testSendReceiveTransactedBatches() {
         cms::MessageConsumer* consumer = cmsProvider->getConsumer();
         cms::MessageProducer* producer = cmsProvider->getProducer();
 
-        producer->setDeliveryMode( DeliveryMode::NON_PERSISTENT );
+        producer->setDeliveryMode(DeliveryMode::NON_PERSISTENT);
 
-        for( int j = 0; j < batchCount - 8; j++ ) {
+        for (int j = 0; j < batchCount - 8; j++) {
 
-            auto_ptr<TextMessage> message( session->createTextMessage( "Batch Message" ) );
+            auto_ptr<TextMessage> message(session->createTextMessage("Batch Message"));
 
-            for( int i = 0; i < batchSize; i++ ) {
-                CPPUNIT_ASSERT_NO_THROW_MESSAGE(
-                    "Send should not throw an exception here.",
-                    producer->send( message.get() ) );
+            for (int i = 0; i < batchSize; i++) {
+                CPPUNIT_ASSERT_NO_THROW_MESSAGE("Send should not throw an exception here.", producer->send(message.get()));
             }
 
-            CPPUNIT_ASSERT_NO_THROW_MESSAGE(
-                "Session Commit should not throw an exception here:",
-                session->commit() );
+            CPPUNIT_ASSERT_NO_THROW_MESSAGE("Session Commit should not throw an exception here:", session->commit());
 
-            for( int i = 0; i < batchSize; i++ ) {
-                CPPUNIT_ASSERT_NO_THROW_MESSAGE(
-                    "Receive Shouldn't throw a Message here:",
-                    message.reset( dynamic_cast<TextMessage*>( consumer->receive( 1000 * 5 ) ) ) );
+            for (int i = 0; i < batchSize; i++) {
+                CPPUNIT_ASSERT_NO_THROW_MESSAGE("Receive Shouldn't throw a Message here:",
+                    message.reset(dynamic_cast<TextMessage*>(consumer->receive(1000 * 5))));
 
-                CPPUNIT_ASSERT_MESSAGE(
-                    "Failed to receive all messages in batch", message.get() != NULL );
-                CPPUNIT_ASSERT( string("Batch Message") == message->getText() );
+                CPPUNIT_ASSERT_MESSAGE("Failed to receive all messages in batch", message.get() != NULL);
+                CPPUNIT_ASSERT(string("Batch Message") == message->getText());
             }
 
-            CPPUNIT_ASSERT_NO_THROW_MESSAGE(
-                "Session Commit should not throw an exception here:",
-                session->commit() );
+            CPPUNIT_ASSERT_NO_THROW_MESSAGE("Session Commit should not throw an exception here:", session->commit());
         }
-    } catch( std::exception& ex ) {
+    } catch (std::exception& ex) {
         std::cout << ex.what() << std::endl;
         throw ex;
     }
@@ -94,41 +86,38 @@ void TransactionTest::testSendRollback() {
         cms::MessageConsumer* consumer = cmsProvider->getConsumer();
         cms::MessageProducer* producer = cmsProvider->getProducer();
 
-        producer->setDeliveryMode( DeliveryMode::NON_PERSISTENT );
+        producer->setDeliveryMode(DeliveryMode::NON_PERSISTENT);
 
-        auto_ptr<TextMessage> outbound1( session->createTextMessage( "First Message" ) );
-        auto_ptr<TextMessage> outbound2( session->createTextMessage( "Second Message" ) );
+        auto_ptr<TextMessage> outbound1(session->createTextMessage("First Message"));
+        auto_ptr<TextMessage> outbound2(session->createTextMessage("Second Message"));
 
         // sends a message
-        producer->send( outbound1.get() );
+        producer->send(outbound1.get());
         session->commit();
 
         // sends a message that gets rollbacked
-        auto_ptr<Message> rollback(
-            session->createTextMessage( "I'm going to get rolled back." ) );
-        producer->send( rollback.get() );
+        auto_ptr<Message> rollback(session->createTextMessage("I'm going to get rolled back."));
+        producer->send(rollback.get());
         session->rollback();
 
         // sends a message
-        producer->send( outbound2.get() );
+        producer->send(outbound2.get());
         session->commit();
 
         // receives the first message
-        auto_ptr<TextMessage> inbound1(
-            dynamic_cast<TextMessage*>( consumer->receive( 1500 ) ) );
+        auto_ptr<TextMessage> inbound1(dynamic_cast<TextMessage*>(consumer->receive(1500)));
 
         // receives the second message
-        auto_ptr<TextMessage> inbound2(
-            dynamic_cast<TextMessage*>( consumer->receive( 4000 ) ) );
+        auto_ptr<TextMessage> inbound2(dynamic_cast<TextMessage*>(consumer->receive(4000)));
 
         // validates that the rollbacked was not consumed
         session->commit();
 
-        CPPUNIT_ASSERT( outbound1->getText() == inbound1->getText() );
-        CPPUNIT_ASSERT( outbound2->getText() == inbound2->getText() );
+        CPPUNIT_ASSERT(outbound1->getText() == inbound1->getText());
+        CPPUNIT_ASSERT(outbound2->getText() == inbound2->getText());
     }
-    AMQ_CATCH_RETHROW( ActiveMQException )
-    AMQ_CATCHALL_THROW( ActiveMQException )
+    AMQ_CATCH_RETHROW(ActiveMQException)
+    AMQ_CATCHALL_THROW(ActiveMQException)
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -139,34 +128,32 @@ void TransactionTest::testSendRollbackCommitRollback() {
     cms::MessageConsumer* consumer = cmsProvider->getConsumer();
     cms::MessageProducer* producer = cmsProvider->getProducer();
 
-    producer->setDeliveryMode( DeliveryMode::NON_PERSISTENT );
+    producer->setDeliveryMode(DeliveryMode::NON_PERSISTENT);
 
-    auto_ptr<TextMessage> outbound1( session->createTextMessage( "First Message" ) );
-    auto_ptr<TextMessage> outbound2( session->createTextMessage( "Second Message" ) );
+    auto_ptr<TextMessage> outbound1(session->createTextMessage("First Message"));
+    auto_ptr<TextMessage> outbound2(session->createTextMessage("Second Message"));
 
     // sends them and then rolls back.
-    producer->send( outbound1.get() );
-    producer->send( outbound2.get() );
+    producer->send(outbound1.get());
+    producer->send(outbound2.get());
     session->rollback();
 
     // Send one and commit.
-    producer->send( outbound1.get() );
+    producer->send(outbound1.get());
     session->commit();
 
     // receives the first message
-    auto_ptr<TextMessage> inbound1(
-        dynamic_cast<TextMessage*>( consumer->receive( 1500 ) ) );
+    auto_ptr<TextMessage> inbound1(dynamic_cast<TextMessage*>(consumer->receive(1500)));
 
-    CPPUNIT_ASSERT( NULL == consumer->receive( 1500 ) );
-    CPPUNIT_ASSERT( outbound1->getText() == inbound1->getText() );
+    CPPUNIT_ASSERT(NULL == consumer->receive( 1500 ));
+    CPPUNIT_ASSERT(outbound1->getText() == inbound1->getText());
 
     session->rollback();
 
-    inbound1.reset(
-        dynamic_cast<TextMessage*>( consumer->receive( 1500 ) ) );
+    inbound1.reset(dynamic_cast<TextMessage*>(consumer->receive(1500)));
 
-    CPPUNIT_ASSERT( NULL == consumer->receive( 1500 ) );
-    CPPUNIT_ASSERT( outbound1->getText() == inbound1->getText() );
+    CPPUNIT_ASSERT(NULL == consumer->receive( 1500 ));
+    CPPUNIT_ASSERT(outbound1->getText() == inbound1->getText());
 
     // validates that the rollbacked was not consumed
     session->commit();
@@ -177,86 +164,77 @@ void TransactionTest::testSendSessionClose() {
 
     try {
 
-        cmsProvider->getProducer()->setDeliveryMode( DeliveryMode::NON_PERSISTENT );
+        cmsProvider->getProducer()->setDeliveryMode(DeliveryMode::NON_PERSISTENT);
 
-        auto_ptr<TextMessage> outbound1(
-            cmsProvider->getSession()->createTextMessage( "First Message" ) );
-        auto_ptr<TextMessage> outbound2(
-            cmsProvider->getSession()->createTextMessage( "Second Message" ) );
+        auto_ptr<TextMessage> outbound1(cmsProvider->getSession()->createTextMessage("First Message"));
+        auto_ptr<TextMessage> outbound2(cmsProvider->getSession()->createTextMessage("Second Message"));
 
         // sends a message
-        cmsProvider->getProducer()->send( outbound1.get() );
+        cmsProvider->getProducer()->send(outbound1.get());
         cmsProvider->getSession()->commit();
 
         // sends a message that gets rolled back
-        auto_ptr<cms::Message> rollback(
-            cmsProvider->getSession()->createTextMessage( "I'm going to get rolled back." ) );
-        cmsProvider->getProducer()->send( rollback.get() );
+        auto_ptr<cms::Message> rollback(cmsProvider->getSession()->createTextMessage("I'm going to get rolled back."));
+        cmsProvider->getProducer()->send(rollback.get());
         cmsProvider->getConsumer()->close();
 
         cmsProvider->reconnectSession();
 
         // sends a message
-        cmsProvider->getProducer()->send( outbound2.get() );
+        cmsProvider->getProducer()->send(outbound2.get());
         cmsProvider->getSession()->commit();
 
         // receives the first message
-        auto_ptr<TextMessage> inbound1(
-            dynamic_cast<TextMessage*>( cmsProvider->getConsumer()->receive( 1500 ) ) );
+        auto_ptr<TextMessage> inbound1(dynamic_cast<TextMessage*>(cmsProvider->getConsumer()->receive(1500)));
 
         // receives the second message
-        auto_ptr<cms::TextMessage> inbound2(
-            dynamic_cast<TextMessage*>( cmsProvider->getConsumer()->receive( 4000 ) ) );
+        auto_ptr<cms::TextMessage> inbound2(dynamic_cast<TextMessage*>(cmsProvider->getConsumer()->receive(4000)));
 
         // validates that the rolled back was not consumed
         cmsProvider->getSession()->commit();
 
-        CPPUNIT_ASSERT( inbound1.get() != NULL );
-        CPPUNIT_ASSERT( inbound2.get() != NULL );
+        CPPUNIT_ASSERT(inbound1.get() != NULL);
+        CPPUNIT_ASSERT(inbound2.get() != NULL);
 
-        CPPUNIT_ASSERT( outbound1->getText() == inbound1->getText() );
-        CPPUNIT_ASSERT( outbound2->getText() == inbound2->getText() );
+        CPPUNIT_ASSERT(outbound1->getText() == inbound1->getText());
+        CPPUNIT_ASSERT(outbound2->getText() == inbound2->getText());
     }
-    AMQ_CATCH_RETHROW( ActiveMQException )
-    AMQ_CATCHALL_THROW( ActiveMQException )
+    AMQ_CATCH_RETHROW(ActiveMQException)
+    AMQ_CATCHALL_THROW(ActiveMQException)
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 void TransactionTest::testWithTTLSet() {
 
-    try{
-        cmsProvider->getProducer()->setDeliveryMode( DeliveryMode::PERSISTENT );
+    try {
+        cmsProvider->getProducer()->setDeliveryMode(DeliveryMode::PERSISTENT);
 
         cms::MessageConsumer* consumer = cmsProvider->getConsumer();
 
-        auto_ptr<TextMessage> outbound1(
-            cmsProvider->getSession()->createTextMessage( "First Message" ) );
+        auto_ptr<TextMessage> outbound1(cmsProvider->getSession()->createTextMessage("First Message"));
 
         const std::size_t NUM_MESSAGES = 50;
 
         // sends a message
-        for( std::size_t i = 0; i < NUM_MESSAGES; ++i ) {
-            cmsProvider->getProducer()->send( outbound1.get(),
-                                              cms::DeliveryMode::PERSISTENT,
-                                              cmsProvider->getProducer()->getPriority(),
-                                              120*1000 );
+        for (std::size_t i = 0; i < NUM_MESSAGES; ++i) {
+            cmsProvider->getProducer()->send(outbound1.get(), cms::DeliveryMode::PERSISTENT,
+                    cmsProvider->getProducer()->getPriority(), 120 * 1000);
         }
 
         cmsProvider->getSession()->commit();
 
-        for( std::size_t i = 0; i < NUM_MESSAGES; ++i ) {
+        for (std::size_t i = 0; i < NUM_MESSAGES; ++i) {
 
             // receives the second message
-            auto_ptr<TextMessage> inbound1(
-                dynamic_cast<TextMessage*>( consumer->receive( 600000 ) ) );
-            CPPUNIT_ASSERT( inbound1.get() != NULL );
-            CPPUNIT_ASSERT( outbound1->getText() == inbound1->getText() );
+            auto_ptr<TextMessage> inbound1(dynamic_cast<TextMessage*>(consumer->receive(600000)));
+            CPPUNIT_ASSERT(inbound1.get() != NULL);
+            CPPUNIT_ASSERT(outbound1->getText() == inbound1->getText());
         }
 
         cmsProvider->getSession()->commit();
     }
-    AMQ_CATCH_RETHROW( ActiveMQException )
-    AMQ_CATCHALL_THROW( ActiveMQException )
+    AMQ_CATCH_RETHROW(ActiveMQException)
+    AMQ_CATCHALL_THROW(ActiveMQException)
 }
 
 ////////////////////////////////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/da83ca6f/activemq-cpp/src/test-integration/activemq/test/TransactionTest.h
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/test-integration/activemq/test/TransactionTest.h b/activemq-cpp/src/test-integration/activemq/test/TransactionTest.h
index e1919a2..ac76ab7 100644
--- a/activemq-cpp/src/test-integration/activemq/test/TransactionTest.h
+++ b/activemq-cpp/src/test-integration/activemq/test/TransactionTest.h
@@ -36,8 +36,7 @@ namespace test{
         virtual ~TransactionTest();
 
         virtual void setUp() {
-            cmsProvider.reset(
-                new util::CMSProvider( getBrokerURL(), cms::Session::SESSION_TRANSACTED ) );
+            cmsProvider.reset(new util::CMSProvider(getBrokerURL(), cms::Session::SESSION_TRANSACTED));
         };
 
         void testSendReceiveTransactedBatches();

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/da83ca6f/activemq-cpp/src/test-integration/activemq/test/VirtualTopicTest.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/test-integration/activemq/test/VirtualTopicTest.cpp b/activemq-cpp/src/test-integration/activemq/test/VirtualTopicTest.cpp
index 162d24f..9278fd3 100644
--- a/activemq-cpp/src/test-integration/activemq/test/VirtualTopicTest.cpp
+++ b/activemq-cpp/src/test-integration/activemq/test/VirtualTopicTest.cpp
@@ -47,64 +47,64 @@ VirtualTopicTest::~VirtualTopicTest() {
 
 ////////////////////////////////////////////////////////////////////////////////
 void VirtualTopicTest::testVirtualTopicSyncReceiveAutoAck() {
-    this->testRunnerSync( cms::Session::AUTO_ACKNOWLEDGE );
+    this->testRunnerSync(cms::Session::AUTO_ACKNOWLEDGE);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 void VirtualTopicTest::testVirtualTopicSyncReceiveClinetAck() {
-    this->testRunnerSync( cms::Session::CLIENT_ACKNOWLEDGE );
+    this->testRunnerSync(cms::Session::CLIENT_ACKNOWLEDGE);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 void VirtualTopicTest::testVirtualTopicSyncReceiveTransacted() {
-    this->testRunnerSync( cms::Session::SESSION_TRANSACTED );
+    this->testRunnerSync(cms::Session::SESSION_TRANSACTED);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void VirtualTopicTest::testRunnerSync( cms::Session::AcknowledgeMode mode ) {
+void VirtualTopicTest::testRunnerSync(cms::Session::AcknowledgeMode mode) {
 
-    cmsProvider->setAckMode( mode );
+    cmsProvider->setAckMode(mode);
     cmsProvider->reconnectSession();
 
     // Create CMS Object for Comms
-    cms::Session* session( cmsProvider->getSession() );
+    cms::Session* session(cmsProvider->getSession());
 
-    auto_ptr<cms::Destination> topic( session->createTopic( PRODUCER_DESTINATION_NAME ) );
-    auto_ptr<cms::Destination> queueA( session->createQueue( CONSUMER_A_DESTINATION_NAME ) );
-    auto_ptr<cms::Destination> queueB( session->createQueue( CONSUMER_B_DESTINATION_NAME ) );
+    auto_ptr<cms::Destination> topic(session->createTopic(PRODUCER_DESTINATION_NAME));
+    auto_ptr<cms::Destination> queueA(session->createQueue(CONSUMER_A_DESTINATION_NAME));
+    auto_ptr<cms::Destination> queueB(session->createQueue(CONSUMER_B_DESTINATION_NAME));
 
-    auto_ptr<cms::MessageProducer> producer( session->createProducer( topic.get() ) );
-    auto_ptr<cms::MessageConsumer> consumerA( session->createConsumer( queueA.get() ) );
-    auto_ptr<cms::MessageConsumer> consumerB( session->createConsumer( queueB.get() ) );
+    auto_ptr<cms::MessageProducer> producer(session->createProducer(topic.get()));
+    auto_ptr<cms::MessageConsumer> consumerA(session->createConsumer(queueA.get()));
+    auto_ptr<cms::MessageConsumer> consumerB(session->createConsumer(queueB.get()));
 
-    producer->setDeliveryMode( cms::DeliveryMode::NON_PERSISTENT );
+    producer->setDeliveryMode(cms::DeliveryMode::NON_PERSISTENT);
 
-    auto_ptr<cms::TextMessage> txtMessage( session->createTextMessage( "TEST MESSAGE" ) );
+    auto_ptr<cms::TextMessage> txtMessage(session->createTextMessage("TEST MESSAGE"));
 
-    for( std::size_t i = 0; i < IntegrationCommon::defaultMsgCount; ++i ) {
-        producer->send( txtMessage.get() );
+    for (std::size_t i = 0; i < IntegrationCommon::defaultMsgCount; ++i) {
+        producer->send(txtMessage.get());
     }
 
-    if( cms::Session::SESSION_TRANSACTED == mode ) {
+    if (cms::Session::SESSION_TRANSACTED == mode) {
         session->commit();
     }
 
-    for( std::size_t i = 0; i < IntegrationCommon::defaultMsgCount; ++i ) {
+    for (std::size_t i = 0; i < IntegrationCommon::defaultMsgCount; ++i) {
 
-        auto_ptr<cms::Message> messageA( consumerA->receive( 2000 ) );
-        CPPUNIT_ASSERT( messageA.get() != NULL );
-        if( cms::Session::CLIENT_ACKNOWLEDGE == mode ) {
+        auto_ptr<cms::Message> messageA(consumerA->receive(2000));
+        CPPUNIT_ASSERT(messageA.get() != NULL);
+        if (cms::Session::CLIENT_ACKNOWLEDGE == mode) {
             messageA->acknowledge();
         }
 
-        auto_ptr<cms::Message> messageB( consumerB->receive( 2000 ) );
-        CPPUNIT_ASSERT( messageB.get() != NULL );
-        if( cms::Session::CLIENT_ACKNOWLEDGE == mode ) {
+        auto_ptr<cms::Message> messageB(consumerB->receive(2000));
+        CPPUNIT_ASSERT(messageB.get() != NULL);
+        if (cms::Session::CLIENT_ACKNOWLEDGE == mode) {
             messageB->acknowledge();
         }
     }
 
-    if( cms::Session::SESSION_TRANSACTED == mode ) {
+    if (cms::Session::SESSION_TRANSACTED == mode) {
         session->commit();
     }
 }

http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/da83ca6f/activemq-cpp/src/test-integration/activemq/test/VirtualTopicTest.h
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/test-integration/activemq/test/VirtualTopicTest.h b/activemq-cpp/src/test-integration/activemq/test/VirtualTopicTest.h
index 0f9492f..b9245d1 100644
--- a/activemq-cpp/src/test-integration/activemq/test/VirtualTopicTest.h
+++ b/activemq-cpp/src/test-integration/activemq/test/VirtualTopicTest.h
@@ -42,7 +42,7 @@ namespace test {
 
     private:
 
-        void testRunnerSync( cms::Session::AcknowledgeMode mode );
+        void testRunnerSync(cms::Session::AcknowledgeMode mode);
 
     };
 


Mime
View raw message