You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2009/09/09 21:46:59 UTC

svn commit: r813094 [1/3] - in /qpid/trunk/qpid/cpp/src: qpid/broker/ qpid/sys/rdma/ tests/

Author: astitcher
Date: Wed Sep  9 19:46:56 2009
New Revision: 813094

URL: http://svn.apache.org/viewvc?rev=813094&view=rev
Log:
Tidied up namespace usage
Miscelleneous whitespace fixes

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/Exchange.cpp
    qpid/trunk/qpid/cpp/src/qpid/broker/MessageBuilder.cpp
    qpid/trunk/qpid/cpp/src/qpid/sys/rdma/RdmaClient.cpp
    qpid/trunk/qpid/cpp/src/qpid/sys/rdma/RdmaServer.cpp
    qpid/trunk/qpid/cpp/src/tests/AccumulatedAckTest.cpp
    qpid/trunk/qpid/cpp/src/tests/Array.cpp
    qpid/trunk/qpid/cpp/src/tests/AsyncCompletion.cpp
    qpid/trunk/qpid/cpp/src/tests/AtomicValue.cpp
    qpid/trunk/qpid/cpp/src/tests/BrokerFixture.h
    qpid/trunk/qpid/cpp/src/tests/ClientMessageTest.cpp
    qpid/trunk/qpid/cpp/src/tests/ClientSessionTest.cpp
    qpid/trunk/qpid/cpp/src/tests/ClusterFailover.cpp
    qpid/trunk/qpid/cpp/src/tests/ClusterFixture.cpp
    qpid/trunk/qpid/cpp/src/tests/ClusterFixture.h
    qpid/trunk/qpid/cpp/src/tests/ConnectionOptions.h
    qpid/trunk/qpid/cpp/src/tests/ConsoleTest.cpp
    qpid/trunk/qpid/cpp/src/tests/DeliveryRecordTest.cpp
    qpid/trunk/qpid/cpp/src/tests/DispatcherTest.cpp
    qpid/trunk/qpid/cpp/src/tests/DtxWorkRecordTest.cpp
    qpid/trunk/qpid/cpp/src/tests/ExchangeTest.cpp
    qpid/trunk/qpid/cpp/src/tests/FieldTable.cpp
    qpid/trunk/qpid/cpp/src/tests/FieldValue.cpp
    qpid/trunk/qpid/cpp/src/tests/ForkedBroker.cpp
    qpid/trunk/qpid/cpp/src/tests/ForkedBroker.h
    qpid/trunk/qpid/cpp/src/tests/Frame.cpp
    qpid/trunk/qpid/cpp/src/tests/FrameDecoder.cpp
    qpid/trunk/qpid/cpp/src/tests/FramingTest.cpp
    qpid/trunk/qpid/cpp/src/tests/HeaderTest.cpp
    qpid/trunk/qpid/cpp/src/tests/HeadersExchangeTest.cpp
    qpid/trunk/qpid/cpp/src/tests/IncompleteMessageList.cpp
    qpid/trunk/qpid/cpp/src/tests/InlineAllocator.cpp
    qpid/trunk/qpid/cpp/src/tests/InlineVector.cpp
    qpid/trunk/qpid/cpp/src/tests/ManagementTest.cpp
    qpid/trunk/qpid/cpp/src/tests/MessageBuilderTest.cpp
    qpid/trunk/qpid/cpp/src/tests/MessageReplayTracker.cpp
    qpid/trunk/qpid/cpp/src/tests/MessageTest.cpp
    qpid/trunk/qpid/cpp/src/tests/MessageUtils.h
    qpid/trunk/qpid/cpp/src/tests/MessagingSessionTests.cpp
    qpid/trunk/qpid/cpp/src/tests/PartialFailure.cpp
    qpid/trunk/qpid/cpp/src/tests/PollableCondition.cpp
    qpid/trunk/qpid/cpp/src/tests/ProxyTest.cpp
    qpid/trunk/qpid/cpp/src/tests/QueueEvents.cpp
    qpid/trunk/qpid/cpp/src/tests/QueueOptionsTest.cpp
    qpid/trunk/qpid/cpp/src/tests/QueuePolicyTest.cpp
    qpid/trunk/qpid/cpp/src/tests/QueueRegistryTest.cpp
    qpid/trunk/qpid/cpp/src/tests/QueueTest.cpp
    qpid/trunk/qpid/cpp/src/tests/RangeSet.cpp
    qpid/trunk/qpid/cpp/src/tests/RateFlowcontrolTest.cpp
    qpid/trunk/qpid/cpp/src/tests/RefCounted.cpp
    qpid/trunk/qpid/cpp/src/tests/ReplicationTest.cpp
    qpid/trunk/qpid/cpp/src/tests/RetryList.cpp
    qpid/trunk/qpid/cpp/src/tests/SequenceNumberTest.cpp
    qpid/trunk/qpid/cpp/src/tests/SequenceSet.cpp
    qpid/trunk/qpid/cpp/src/tests/SessionState.cpp
    qpid/trunk/qpid/cpp/src/tests/Shlib.cpp
    qpid/trunk/qpid/cpp/src/tests/SocketProxy.h
    qpid/trunk/qpid/cpp/src/tests/TestMessageStore.h
    qpid/trunk/qpid/cpp/src/tests/TestOptions.h
    qpid/trunk/qpid/cpp/src/tests/TimerTest.cpp
    qpid/trunk/qpid/cpp/src/tests/TopicExchangeTest.cpp
    qpid/trunk/qpid/cpp/src/tests/TxBufferTest.cpp
    qpid/trunk/qpid/cpp/src/tests/TxMocks.h
    qpid/trunk/qpid/cpp/src/tests/TxPublishTest.cpp
    qpid/trunk/qpid/cpp/src/tests/Url.cpp
    qpid/trunk/qpid/cpp/src/tests/Uuid.cpp
    qpid/trunk/qpid/cpp/src/tests/Variant.cpp
    qpid/trunk/qpid/cpp/src/tests/XmlClientSessionTest.cpp
    qpid/trunk/qpid/cpp/src/tests/client_test.cpp
    qpid/trunk/qpid/cpp/src/tests/cluster_test.cpp
    qpid/trunk/qpid/cpp/src/tests/consume.cpp
    qpid/trunk/qpid/cpp/src/tests/datagen.cpp
    qpid/trunk/qpid/cpp/src/tests/echotest.cpp
    qpid/trunk/qpid/cpp/src/tests/exception_test.cpp
    qpid/trunk/qpid/cpp/src/tests/failover_soak.cpp
    qpid/trunk/qpid/cpp/src/tests/latencytest.cpp
    qpid/trunk/qpid/cpp/src/tests/logging.cpp
    qpid/trunk/qpid/cpp/src/tests/perftest.cpp
    qpid/trunk/qpid/cpp/src/tests/publish.cpp
    qpid/trunk/qpid/cpp/src/tests/qpid_ping.cpp
    qpid/trunk/qpid/cpp/src/tests/qrsh.cpp
    qpid/trunk/qpid/cpp/src/tests/qrsh_server.cpp
    qpid/trunk/qpid/cpp/src/tests/receiver.cpp
    qpid/trunk/qpid/cpp/src/tests/replaying_sender.cpp
    qpid/trunk/qpid/cpp/src/tests/resuming_receiver.cpp
    qpid/trunk/qpid/cpp/src/tests/sender.cpp
    qpid/trunk/qpid/cpp/src/tests/shlibtest.cpp
    qpid/trunk/qpid/cpp/src/tests/test_store.cpp
    qpid/trunk/qpid/cpp/src/tests/test_tools.h
    qpid/trunk/qpid/cpp/src/tests/topic_listener.cpp
    qpid/trunk/qpid/cpp/src/tests/topic_publisher.cpp
    qpid/trunk/qpid/cpp/src/tests/txjob.cpp
    qpid/trunk/qpid/cpp/src/tests/txshift.cpp
    qpid/trunk/qpid/cpp/src/tests/txtest.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Exchange.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Exchange.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/Exchange.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/Exchange.cpp Wed Sep  9 19:46:56 2009
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -38,7 +38,7 @@
 using qpid::management::Args;
 namespace _qmf = qmf::org::apache::qpid::broker;
 
-namespace 
+namespace
 {
 const std::string qpidMsgSequence("qpid.msg_sequence");
 const std::string qpidSequenceCounter("qpid.sequence_counter");
@@ -51,17 +51,19 @@
 const std::string fedOpUnbind("U");
 const std::string fedOpReorigin("R");
 const std::string fedOpHello("H");
+
+const std::string QPID_MANAGEMENT("qpid.management");
 }
 
 
 Exchange::PreRoute::PreRoute(Deliverable& msg, Exchange* _p):parent(_p) {
     if (parent){
         if (parent->sequence || parent->ive) parent->sequenceLock.lock();
-        
+
         if (parent->sequence){
             parent->sequenceNo++;
-            msg.getMessage().getProperties<MessageProperties>()->getApplicationHeaders().setInt64(qpidMsgSequence,parent->sequenceNo); 
-        } 
+            msg.getMessage().getProperties<MessageProperties>()->getApplicationHeaders().setInt64(qpidMsgSequence,parent->sequenceNo);
+        }
         if (parent->ive) {
             parent->lastMsg =  &( msg.getMessage());
         }
@@ -99,11 +101,9 @@
     }
 }
 
-static const std::string QPID_MANAGEMENT("qpid.management");
-
 Exchange::Exchange(const string& _name, bool _durable, const qpid::framing::FieldTable& _args,
                    Manageable* parent, Broker* b)
-    : name(_name), durable(_durable), alternateUsers(0), persistenceId(0), 
+    : name(_name), durable(_durable), alternateUsers(0), persistenceId(0),
       args(_args), sequence(false), sequenceNo(0), ive(false), mgmtExchange(0), broker(b)
 {
     if (parent != 0 && broker != 0)
@@ -169,7 +169,7 @@
     string name;
     string type;
     FieldTable args;
-    
+
     buffer.getShortString(name);
     bool durable(buffer.getOctet());
     buffer.getShortString(type);
@@ -185,7 +185,7 @@
     }
 }
 
-void Exchange::encode(Buffer& buffer) const 
+void Exchange::encode(Buffer& buffer) const
 {
     buffer.putShortString(name);
     buffer.putOctet(durable);
@@ -195,8 +195,8 @@
     buffer.put(args);
 }
 
-uint32_t Exchange::encodedSize() const 
-{ 
+uint32_t Exchange::encodedSize() const
+{
     return name.size() + 1/*short string size*/
         + 1 /*durable*/
         + getType().size() + 1/*short string size*/

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/MessageBuilder.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/MessageBuilder.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/MessageBuilder.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/MessageBuilder.cpp Wed Sep  9 19:46:56 2009
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -30,14 +30,14 @@
 using namespace qpid::broker;
 using namespace qpid::framing;
 
-namespace 
+namespace
 {
     std::string type_str(uint8_t type);
+    const std::string QPID_MANAGEMENT("qpid.management");
 }
-MessageBuilder::MessageBuilder(MessageStore* const _store, uint64_t _stagingThreshold) : 
-    state(DORMANT), store(_store), stagingThreshold(_stagingThreshold), staging(false) {}
 
-static const std::string QPID_MANAGEMENT("qpid.management");
+MessageBuilder::MessageBuilder(MessageStore* const _store, uint64_t _stagingThreshold) :
+    state(DORMANT), store(_store), stagingThreshold(_stagingThreshold), staging(false) {}
 
 void MessageBuilder::handle(AMQFrame& frame)
 {
@@ -54,10 +54,10 @@
             AMQFrame header((AMQHeaderBody()));
             header.setBof(false);
             header.setEof(false);
-            message->getFrames().append(header);            
+            message->getFrames().append(header);
         } else if (type != HEADER_BODY) {
             throw CommandInvalidException(
-                QPID_MSG("Invalid frame sequence for message, expected header or content got " 
+                QPID_MSG("Invalid frame sequence for message, expected header or content got "
                          << type_str(type) << ")"));
         }
         state = CONTENT;
@@ -74,13 +74,13 @@
     } else {
         message->getFrames().append(frame);
         //have we reached the staging limit? if so stage message and release content
-        if (state == CONTENT 
-            && stagingThreshold 
+        if (state == CONTENT
+            && stagingThreshold
             && message->getFrames().getContentSize() >= stagingThreshold
             && !NullMessageStore::isNullStore(store)
-            && message->getExchangeName() != QPID_MANAGEMENT /* don't stage mgnt messages */)   
+            && message->getExchangeName() != QPID_MANAGEMENT /* don't stage mgnt messages */)
         {
-            message->releaseContent(store); 
+            message->releaseContent(store);
             staging = true;
         }
     }
@@ -108,7 +108,7 @@
 const std::string HEARTBEAT_BODY_S = "HEARTBEAT";
 const std::string UNKNOWN = "unknown";
 
-std::string type_str(uint8_t type) 
+std::string type_str(uint8_t type)
 {
     switch(type) {
     case METHOD_BODY: return METHOD_BODY_S;
@@ -124,7 +124,7 @@
 void MessageBuilder::checkType(uint8_t expected, uint8_t actual)
 {
     if (expected != actual) {
-        throw CommandInvalidException(QPID_MSG("Invalid frame sequence for message (expected " 
+        throw CommandInvalidException(QPID_MSG("Invalid frame sequence for message (expected "
                                                << type_str(expected) << " got " << type_str(actual) << ")"));
     }
 }

Modified: qpid/trunk/qpid/cpp/src/qpid/sys/rdma/RdmaClient.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/rdma/RdmaClient.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/rdma/RdmaClient.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/rdma/RdmaClient.cpp Wed Sep  9 19:46:56 2009
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -45,6 +45,9 @@
 using qpid::sys::TIME_SEC;
 using qpid::sys::TIME_INFINITE;
 
+namespace qpid {
+namespace tests {
+
 // count of messages
 int64_t smsgs = 0;
 int64_t sbytes = 0;
@@ -144,6 +147,10 @@
     p->shutdown();
 }
 
+}} // namespace qpid::tests
+
+using namespace qpid::tests;
+
 int main(int argc, char* argv[]) {
     vector<string> args(&argv[0], &argv[argc]);
 

Modified: qpid/trunk/qpid/cpp/src/qpid/sys/rdma/RdmaServer.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/rdma/RdmaServer.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/rdma/RdmaServer.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/rdma/RdmaServer.cpp Wed Sep  9 19:46:56 2009
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -39,6 +39,9 @@
 using qpid::sys::Dispatcher;
 
 // All the accepted connections
+namespace qpid {
+namespace tests {
+
 struct ConRec {
     Rdma::Connection::intrusive_ptr connection;
     Rdma::AsynchIO* data;
@@ -134,6 +137,10 @@
     cr->data->start(poller);
 }
 
+}} // namespace qpid::tests
+
+using namespace qpid::tests;
+
 int main(int argc, char* argv[]) {
     vector<string> args(&argv[0], &argv[argc]);
 

Modified: qpid/trunk/qpid/cpp/src/tests/AccumulatedAckTest.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/AccumulatedAckTest.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/AccumulatedAckTest.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/AccumulatedAckTest.cpp Wed Sep  9 19:46:56 2009
@@ -8,9 +8,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -28,6 +28,9 @@
 using namespace qpid::framing;
 
 
+namespace qpid {
+namespace tests {
+
 bool covers(const AccumulatedAck& ack, int i)
 {
     return ack.covers(SequenceNumber(i));
@@ -97,7 +100,7 @@
 
     ack.update(mark, ranges);
 
-    for(int i = 0; i <= 15; i++) {            
+    for(int i = 0; i <= 15; i++) {
         BOOST_CHECK(covers(ack, i));
     }
     BOOST_CHECK(!covers(ack, 16));
@@ -221,7 +224,7 @@
     ack.update(SequenceNumber(9), SequenceNumber(9));
     ack.update(SequenceNumber(3), SequenceNumber(4));
 
-    for(int i = 0; i <= 15; i++) {            
+    for(int i = 0; i <= 15; i++) {
         BOOST_CHECK(covers(ack, i));
     }
     BOOST_CHECK(!covers(ack, 16));
@@ -230,3 +233,5 @@
 
 QPID_AUTO_TEST_SUITE_END()
 
+
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/Array.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/Array.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/Array.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/Array.cpp Wed Sep  9 19:46:56 2009
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -25,6 +25,9 @@
 
 #include "unit_test.h"
 
+namespace qpid {
+namespace tests {
+
 QPID_AUTO_TEST_SUITE(ArrayTestSuite)
 
 using namespace qpid::framing;
@@ -69,7 +72,7 @@
         Array a(data);
         b = a;
         BOOST_CHECK_EQUAL(a, b);
-    }        
+    }
     std::vector<std::string> data2;
     b.collect(data2);
     //BOOST_CHECK_EQUAL(data, data2);
@@ -77,3 +80,5 @@
 }
 
 QPID_AUTO_TEST_SUITE_END()
+
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/AsyncCompletion.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/AsyncCompletion.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/AsyncCompletion.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/AsyncCompletion.cpp Wed Sep  9 19:46:56 2009
@@ -49,10 +49,13 @@
  * message enqueues at the correct time.
  */
 
+namespace qpid {
+namespace tests {
+
 class AsyncCompletionMessageStore : public NullMessageStore {
   public:
     sys::BlockingQueue<boost::intrusive_ptr<PersistableMessage> > enqueued;
-    
+
     AsyncCompletionMessageStore() : NullMessageStore() {}
     ~AsyncCompletionMessageStore(){}
 
@@ -82,10 +85,10 @@
         transfers[i] = s.messageTransfer(arg::content=msg);
     }
 
-    // Get hold of the broker-side messages. 
+    // Get hold of the broker-side messages.
     typedef vector<intrusive_ptr<PersistableMessage> > BrokerMessages;
     BrokerMessages enqueued;
-    for (int j = 0; j < count; ++j) 
+    for (int j = 0; j < count; ++j)
         enqueued.push_back(store->enqueued.pop(TIME_SEC));
 
     // Send a sync, make sure it does not complete till all messages are complete.
@@ -111,3 +114,5 @@
 }
 
 QPID_AUTO_TEST_SUITE_END()
+
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/AtomicValue.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/AtomicValue.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/AtomicValue.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/AtomicValue.cpp Wed Sep  9 19:46:56 2009
@@ -21,6 +21,9 @@
 #include "test_tools.h"
 #include "qpid/sys/AtomicValue.h"
 
+namespace qpid {
+namespace tests {
+
 QPID_AUTO_TEST_SUITE(AtomicValueTestSuite)
 
 QPID_AUTO_TEST_CASE(test) {
@@ -47,3 +50,5 @@
 
 
 QPID_AUTO_TEST_SUITE_END()
+
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/BrokerFixture.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/BrokerFixture.h?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/BrokerFixture.h (original)
+++ qpid/trunk/qpid/cpp/src/tests/BrokerFixture.h Wed Sep  9 19:46:56 2009
@@ -10,9 +10,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -35,6 +35,9 @@
 #include "qpid/sys/Thread.h"
 #include <boost/noncopyable.hpp>
 
+namespace qpid {
+namespace tests {
+
 /**
  * A fixture with an in-process broker.
  */
@@ -55,7 +58,7 @@
         }
         opts.port=0;
         // Management doesn't play well with multiple in-process brokers.
-        opts.enableMgmt=false;  
+        opts.enableMgmt=false;
         opts.workerThreads=1;
         opts.dataDir="";
         opts.auth=false;
@@ -144,5 +147,6 @@
 typedef SessionFixtureT<LocalConnection> SessionFixture;
 typedef SessionFixtureT<ProxyConnection> ProxySessionFixture;
 
+}} // namespace qpid::tests
 
 #endif  /*!TESTS_BROKERFIXTURE_H*/

Modified: qpid/trunk/qpid/cpp/src/tests/ClientMessageTest.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/ClientMessageTest.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/ClientMessageTest.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/ClientMessageTest.cpp Wed Sep  9 19:46:56 2009
@@ -24,6 +24,9 @@
 
 using namespace qpid::client;
 
+namespace qpid {
+namespace tests {
+
 QPID_AUTO_TEST_SUITE(ClientMessageTestSuite)
 
 QPID_AUTO_TEST_CASE(MessageCopyAssign) {
@@ -33,7 +36,7 @@
     Message c(m);
     BOOST_CHECK_EQUAL("foo", c.getData());
     Message a;
-    BOOST_CHECK_EQUAL("", a.getData());    
+    BOOST_CHECK_EQUAL("", a.getData());
     a = m;
     BOOST_CHECK_EQUAL("foo", a.getData());
     a.setData("a");
@@ -44,3 +47,5 @@
 }
 
 QPID_AUTO_TEST_SUITE_END()
+
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/ClientSessionTest.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/ClientSessionTest.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/ClientSessionTest.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/ClientSessionTest.cpp Wed Sep  9 19:46:56 2009
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -40,6 +40,9 @@
 
 #include <vector>
 
+namespace qpid {
+namespace tests {
+
 QPID_AUTO_TEST_SUITE(ClientSessionTest)
 
 using namespace qpid::client;
@@ -122,12 +125,12 @@
     ClientSessionFixture fix;
     fix.session =fix.connection.newSession();
     size_t count = 100;
-    for (size_t i = 0; i < count; ++i) 
+    for (size_t i = 0; i < count; ++i)
         fix.session.messageTransfer(arg::content=Message(boost::lexical_cast<string>(i), "my-queue"));
     DummyListener listener(fix.session, "my-queue", count);
     listener.run();
-    BOOST_CHECK_EQUAL(count, listener.messages.size());        
-    for (size_t i = 0; i < count; ++i) 
+    BOOST_CHECK_EQUAL(count, listener.messages.size());
+    for (size_t i = 0; i < count; ++i)
         BOOST_CHECK_EQUAL(boost::lexical_cast<string>(i), listener.messages[i].getData());
 }
 
@@ -142,8 +145,8 @@
         fix.session.messageTransfer(arg::content=Message(boost::lexical_cast<string>(i), "my-queue"));
     }
     t.join();
-    BOOST_CHECK_EQUAL(count, listener.messages.size());        
-    for (size_t i = 0; i < count; ++i) 
+    BOOST_CHECK_EQUAL(count, listener.messages.size());
+    for (size_t i = 0; i < count; ++i)
         BOOST_CHECK_EQUAL(boost::lexical_cast<string>(i), listener.messages[i].getData());
 }
 
@@ -215,7 +218,7 @@
     BOOST_CHECK_EQUAL("foo1", lq.pop().getData());
     BOOST_CHECK(lq.empty());    // Credit exhausted.
     fix.subs.getSubscription("lq").setFlowControl(FlowControl::unlimited());
-    BOOST_CHECK_EQUAL("foo2", lq.pop().getData());    
+    BOOST_CHECK_EQUAL("foo2", lq.pop().getData());
 }
 
 struct DelayedTransfer : sys::Runnable
@@ -246,7 +249,7 @@
     Thread t(sender);
     //test timed get where message shows up after a short delay
     BOOST_CHECK(fix.subs.get(got, "getq", 5*TIME_SEC));
-    BOOST_CHECK_EQUAL("foo2", got.getData());    
+    BOOST_CHECK_EQUAL("foo2", got.getData());
     t.join();
 }
 
@@ -271,8 +274,8 @@
     ClientSessionFixture fix(opts);
     fix.session.queueDeclare(arg::queue="my-queue", arg::exclusive=true, arg::autoDelete=true);
 
-    for (uint i = 0; i < 10; i++) {        
-        Message m((boost::format("Message_%1%") % (i+1)).str(), "my-queue");        
+    for (uint i = 0; i < 10; i++) {
+        Message m((boost::format("Message_%1%") % (i+1)).str(), "my-queue");
         if (i % 2) m.getDeliveryProperties().setTtl(500);
         fix.session.messageTransfer(arg::content=m);
     }
@@ -286,15 +289,15 @@
     ClientSessionFixture fix;
     fix.session.queueDeclare(arg::queue="my-queue", arg::exclusive=true, arg::autoDelete=true);
 
-    for (uint i = 0; i < 10; i++) {        
-        Message m((boost::format("Message_%1%") % (i+1)).str(), "my-queue");        
+    for (uint i = 0; i < 10; i++) {
+        Message m((boost::format("Message_%1%") % (i+1)).str(), "my-queue");
         if (i % 2) m.getDeliveryProperties().setTtl(200);
         fix.session.messageTransfer(arg::content=m);
     }
 
     qpid::sys::usleep(300* 1000);
 
-    for (uint i = 0; i < 10; i++) {        
+    for (uint i = 0; i < 10; i++) {
         if (i % 2) continue;
         Message m;
         BOOST_CHECK(fix.subs.get(m, "my-queue", TIME_SEC));
@@ -306,8 +309,8 @@
     ClientSessionFixture fix;
 
     const uint count=10;
-    for (uint i = 0; i < count; i++) {        
-        Message m((boost::format("Message_%1%") % (i+1)).str(), "my-queue");        
+    for (uint i = 0; i < count; i++) {
+        Message m((boost::format("Message_%1%") % (i+1)).str(), "my-queue");
         fix.session.messageTransfer(arg::content=m);
     }
 
@@ -334,7 +337,7 @@
     for (uint i = 0; i < count; i++) {
         BOOST_CHECK_EQUAL((boost::format("Message_%1%") % (i+1)).str(), l2.messages[i].getData());
     }
-    
+
     fix.subs.stop();
     fix.subs.wait();
     fix.session.close();
@@ -344,8 +347,8 @@
     ClientSessionFixture fix;
     const uint count = 8;
     const uint chunk = 4;
-    for (uint i = 0; i < count; i++) {        
-        Message m((boost::format("Message_%1%") % (i+1)).str(), "my-queue");        
+    for (uint i = 0; i < count; i++) {
+        Message m((boost::format("Message_%1%") % (i+1)).str(), "my-queue");
         fix.session.messageTransfer(arg::content=m);
     }
 
@@ -358,25 +361,25 @@
     Subscription s = fix.subs.subscribe(q, "my-queue", settings);
     fix.session.messageFlush(arg::destination=s.getName());
     SequenceSet accepted;
-    for (uint i = 0; i < chunk; i++) {        
+    for (uint i = 0; i < chunk; i++) {
         Message m;
         BOOST_CHECK(q.get(m));
         BOOST_CHECK_EQUAL((boost::format("Message_%1%") % (i+1)).str(), m.getData());
         accepted.add(m.getId());
-    }    
+    }
     Message m;
     BOOST_CHECK(!q.get(m));
-    
+
     s.accept(accepted);
     fix.session.messageFlush(arg::destination=s.getName());
     accepted.clear();
-    
-    for (uint i = chunk; i < count; i++) {        
+
+    for (uint i = chunk; i < count; i++) {
         Message m;
         BOOST_CHECK(q.get(m));
         BOOST_CHECK_EQUAL((boost::format("Message_%1%") % (i+1)).str(), m.getData());
         accepted.add(m.getId());
-    }    
+    }
     fix.session.messageAccept(accepted);
 }
 
@@ -424,7 +427,7 @@
     connection.open(settings);
     AsyncSession session = connection.newSession();
     Message message(string(512, 'X'));
-    
+
     boost::ptr_vector<Publisher> publishers;
     for (size_t i = 0; i < 5; i++) {
         publishers.push_back(new Publisher(connection, message, 100));
@@ -447,7 +450,7 @@
     ScopedSuppressLogging sl;
     BOOST_CHECK_THROW(fix.subs.subscribe(q, "myq", "second"), ResourceLockedException);
     ;
-    
+
 }
 
 QPID_AUTO_TEST_CASE(testExclusiveBinding) {
@@ -478,7 +481,7 @@
     fix.subs.subscribe(p, "some-queue");
     fix.subs.cancel("some-queue");
     fix.subs.subscribe(q, "some-queue");
-    
+
     fix.session.messageTransfer(arg::content=Message("some-data", "some-queue"));
     fix.session.messageFlush(arg::destination="some-queue");
 
@@ -542,10 +545,10 @@
         std::ostringstream data;
         size_t size = 100 - ((i % 10) * 10);
         data << std::string(size, 'x');
-    
+
         Message m(data.str(), queue);
         m.getHeaders().setString(key, "abc");
-        fix.session.messageTransfer(arg::content=m);    
+        fix.session.messageTransfer(arg::content=m);
     }
 }
 
@@ -594,7 +597,7 @@
     ClientSessionFixture fix;
     fix.session.queueDeclare(arg::queue="my-queue", arg::exclusive=true, arg::autoDelete=true);
 
-    Message m("my-message", "my-queue");        
+    Message m("my-message", "my-queue");
     m.getDeliveryProperties().setTtl(60000);
     m.getDeliveryProperties().setExpiration(12345);
     fix.session.messageTransfer(arg::content=m);
@@ -606,4 +609,4 @@
 
 QPID_AUTO_TEST_SUITE_END()
 
-
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/ClusterFailover.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/ClusterFailover.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/ClusterFailover.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/ClusterFailover.cpp Wed Sep  9 19:46:56 2009
@@ -32,6 +32,9 @@
 #include <boost/algorithm/string.hpp>
 #include <boost/bind.hpp>
 
+namespace qpid {
+namespace tests {
+
 QPID_AUTO_TEST_SUITE(ClusterFailoverTestSuite)
 
 using namespace std;
@@ -60,3 +63,5 @@
 }
 
 QPID_AUTO_TEST_SUITE_END()
+
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/ClusterFixture.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/ClusterFixture.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/ClusterFixture.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/ClusterFixture.cpp Wed Sep  9 19:46:56 2009
@@ -61,6 +61,9 @@
 
 #include "ClusterFixture.h"
 
+namespace qpid {
+namespace tests {
+
 ClusterFixture::ClusterFixture(size_t n, const Args& args_, int localIndex_)
     : name(Uuid(true).str()), localIndex(localIndex_), userArgs(args_)
 {
@@ -152,3 +155,5 @@
         s.insert((*i)[0].get<qpid::TcpAddress>()->port);
     return s;
 }
+
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/ClusterFixture.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/ClusterFixture.h?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/ClusterFixture.h (original)
+++ qpid/trunk/qpid/cpp/src/tests/ClusterFixture.h Wed Sep  9 19:46:56 2009
@@ -60,6 +60,9 @@
 using boost::shared_ptr;
 using qpid::cluster::Cluster;
 
+namespace qpid {
+namespace tests {
+
 /** Cluster fixture is a vector of ports for the replicas.
  *
  * At most one replica (by default replica 0) is in the current
@@ -107,4 +110,6 @@
  */
 std::set<int> knownBrokerPorts(qpid::client::Connection& source, int n=-1);
 
+}} // namespace qpid::tests
+
 #endif  /*!CLUSTER_FIXTURE_H*/

Modified: qpid/trunk/qpid/cpp/src/tests/ConnectionOptions.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/ConnectionOptions.h?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/ConnectionOptions.h (original)
+++ qpid/trunk/qpid/cpp/src/tests/ConnectionOptions.h Wed Sep  9 19:46:56 2009
@@ -10,9 +10,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -25,6 +25,8 @@
 #include "qpid/client/ConnectionSettings.h"
 #include "qpid/Options.h"
 
+namespace qpid {
+
 /**
  * Options parser for ConnectionOptions.
  */
@@ -35,9 +37,9 @@
     {
         using namespace qpid;
         addOptions()
-            ("broker,b", optValue(host, "HOST"), "Broker host to connect to") 
+            ("broker,b", optValue(host, "HOST"), "Broker host to connect to")
             ("port,p", optValue(port, "PORT"), "Broker port to connect to")
-            ("protocol,P", optValue(protocol, "tcp|rdma"), "Protocol to use for broker connection")            
+            ("protocol,P", optValue(protocol, "tcp|rdma"), "Protocol to use for broker connection")
             ("virtualhost,v", optValue(virtualhost, "VHOST"), "virtual host")
             ("username", optValue(username, "USER"), "user name for broker log in.")
             ("password", optValue(password, "PASSWORD"), "password for broker log in.")
@@ -46,7 +48,7 @@
             ("max-channels", optValue(maxChannels, "N"), "the maximum number of channels the client requires.")
             ("heartbeat", optValue(heartbeat, "N"), "Desired heartbeat interval in seconds.")
             ("max-frame-size", optValue(maxFrameSize, "N"), "the maximum frame size to request.")
-            ("bounds-multiplier", optValue(bounds, "N"), 
+            ("bounds-multiplier", optValue(bounds, "N"),
              "bound size of write queue (as a multiple of the max frame size).")
             ("tcp-nodelay", optValue(tcpNoDelay), "Turn on tcp-nodelay")
             ("service", optValue(service, "SERVICE-NAME"), "SASL service name.")
@@ -55,4 +57,6 @@
     }
 };
 
+} // namespace qpid
+
 #endif  /*!QPID_CLIENT_CONNECTIONOPTIONS_H*/

Modified: qpid/trunk/qpid/cpp/src/tests/ConsoleTest.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/ConsoleTest.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/ConsoleTest.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/ConsoleTest.cpp Wed Sep  9 19:46:56 2009
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -23,6 +23,9 @@
 #include "qpid/console/ClassKey.h"
 #include "unit_test.h"
 
+namespace qpid {
+namespace tests {
+
 QPID_AUTO_TEST_SUITE(ConsoleTestSuite)
 
 using namespace qpid::framing;
@@ -40,4 +43,4 @@
 
 QPID_AUTO_TEST_SUITE_END()
 
-
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/DeliveryRecordTest.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/DeliveryRecordTest.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/DeliveryRecordTest.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/DeliveryRecordTest.cpp Wed Sep  9 19:46:56 2009
@@ -8,9 +8,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -31,6 +31,9 @@
 using boost::dynamic_pointer_cast;
 using std::list;
 
+namespace qpid {
+namespace tests {
+
 QPID_AUTO_TEST_SUITE(DeliveryRecordTestSuite)
 
 QPID_AUTO_TEST_CASE(testSort)
@@ -60,3 +63,4 @@
 
 QPID_AUTO_TEST_SUITE_END()
 
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/DispatcherTest.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/DispatcherTest.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/DispatcherTest.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/DispatcherTest.cpp Wed Sep  9 19:46:56 2009
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -39,6 +39,9 @@
 using namespace std;
 using namespace qpid::sys;
 
+namespace qpid {
+namespace tests {
+
 int writeALot(int fd, const string& s) {
     int bytesWritten = 0;
     do {
@@ -46,7 +49,7 @@
         int lastWrite = ::write(fd, s.c_str(), s.size());
         if ( lastWrite >= 0) {
             bytesWritten += lastWrite;
-        } 
+        }
     } while (errno != EAGAIN);
     return bytesWritten;
 }
@@ -54,13 +57,13 @@
 int readALot(int fd) {
     int bytesRead = 0;
     char buf[10240];
-    
+
     do {
         errno = 0;
         int lastRead = ::read(fd, buf, sizeof(buf));
         if ( lastRead >= 0) {
             bytesRead += lastRead;
-        } 
+        }
     } while (errno != EAGAIN);
     return bytesRead;
 }
@@ -83,7 +86,7 @@
 }
 
 void wInterrupt(DispatchHandle&) {
-	cerr << "W";	
+	cerr << "W";
 }
 
 DispatchHandle::Callback rcb = rInterrupt;
@@ -108,15 +111,19 @@
 	   wh->call(wcb);
     } else {
         phase1finished = true;
-        assert(::timer_delete(timer) == 0);        
+        assert(::timer_delete(timer) == 0);
     }
 }
 
+}} // namespace qpid::tests
+
+using namespace qpid::tests;
+
 int main(int /*argc*/, char** /*argv*/)
 {
     // Create poller
     Poller::shared_ptr poller(new Poller);
-    
+
     // Create dispatcher thread
     Dispatcher d(poller);
     Dispatcher d1(poller);
@@ -131,14 +138,14 @@
     int sv[2];
     int rc = ::socketpair(AF_UNIX, SOCK_STREAM, 0, sv);
     assert(rc >= 0);
-    
+
     // Set non-blocking
     rc = ::fcntl(sv[0], F_SETFL, O_NONBLOCK);
     assert(rc >= 0);
 
     rc = ::fcntl(sv[1], F_SETFL, O_NONBLOCK);
     assert(rc >= 0);
-    
+
     // Make up a large string
     string testString = "This is only a test ... 1,2,3,4,5,6,7,8,9,10;";
     for (int i = 0; i < 8; i++)
@@ -148,19 +155,19 @@
     PosixIOHandle f1(sv[1]);
 
     rh = new DispatchHandleRef(f0, boost::bind(reader, _1, sv[0]), 0, 0);
-    wh = new DispatchHandleRef(f1, 0, boost::bind(writer, _1, sv[1], testString), 0);    
+    wh = new DispatchHandleRef(f1, 0, boost::bind(writer, _1, sv[1], testString), 0);
 
     rh->startWatch(poller);
     wh->startWatch(poller);
 
     // Set up a regular itimer interupt
-    
+
     // Ignore signal in this thread
     ::sigset_t sm;
     ::sigemptyset(&sm);
     ::sigaddset(&sm, SIGRTMIN);
     ::pthread_sigmask(SIG_BLOCK, &sm, 0);
-    
+
     // Signal handling
     struct ::sigaction sa;
     sa.sa_sigaction = timer_handler;
@@ -168,18 +175,18 @@
     ::sigemptyset(&sa.sa_mask);
     rc = ::sigaction(SIGRTMIN, &sa,0);
     assert(rc == 0);
-    
+
     ::sigevent se;
     ::memset(&se, 0, sizeof(se)); // Clear to make valgrind happy (this *is* the neatest way to do this portably - sigh)
     se.sigev_notify = SIGEV_SIGNAL;
     se.sigev_signo = SIGRTMIN;
     rc = ::timer_create(CLOCK_REALTIME, &se, &timer);
     assert(rc == 0);
-    
+
     itimerspec ts = {
     /*.it_value = */ {2, 0},  // s, ns
     /*.it_interval = */ {2, 0}}; // s, ns
-    
+
     rc = ::timer_settime(timer, 0, &ts, 0);
     assert(rc == 0);
 
@@ -200,11 +207,11 @@
     sa.sa_sigaction = stop_handler;
     rc = ::sigaction(SIGRTMIN, &sa,0);
     assert(rc == 0);
-    
+
     itimerspec nts = {
     /*.it_value = */ {30, 0},  // s, ns
     /*.it_interval = */ {30, 0}}; // s, ns
-    
+
     rc = ::timer_create(CLOCK_REALTIME, &se, &timer);
     assert(rc == 0);
     rc = ::timer_settime(timer, 0, &nts, 0);
@@ -228,7 +235,7 @@
 
     rc = ::timer_delete(timer);
     assert(rc == 0);
-    
+
     poller->shutdown();
     dt.join();
     dt1.join();
@@ -237,6 +244,6 @@
 
     cout << "\nWrote: " << writtenBytes << "\n";
     cout << "Read: " << readBytes << "\n";
-    
+
     return 0;
 }

Modified: qpid/trunk/qpid/cpp/src/tests/DtxWorkRecordTest.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/DtxWorkRecordTest.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/DtxWorkRecordTest.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/DtxWorkRecordTest.cpp Wed Sep  9 19:46:56 2009
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -27,6 +27,9 @@
 using namespace qpid::broker;
 using boost::static_pointer_cast;
 
+namespace qpid {
+namespace tests {
+
 QPID_AUTO_TEST_SUITE(DtxWorkRecordTestSuite)
 
 QPID_AUTO_TEST_CASE(testOnePhaseCommit){
@@ -44,7 +47,7 @@
     DtxBuffer::shared_ptr bufferB(new DtxBuffer());
     bufferB->enlist(static_pointer_cast<TxOp>(opB));
     bufferB->markEnded();
-        
+
     DtxWorkRecord work("my-xid", &store);
     work.add(bufferA);
     work.add(bufferB);
@@ -77,7 +80,7 @@
     DtxBuffer::shared_ptr bufferC(new DtxBuffer());
     bufferC->enlist(static_pointer_cast<TxOp>(opC));
     bufferC->markEnded();
-        
+
     DtxWorkRecord work("my-xid", &store);
     work.add(bufferA);
     work.add(bufferB);
@@ -108,7 +111,7 @@
     DtxBuffer::shared_ptr bufferB(new DtxBuffer());
     bufferB->enlist(static_pointer_cast<TxOp>(opB));
     bufferB->markEnded();
-        
+
     DtxWorkRecord work("my-xid", &store);
     work.add(bufferA);
     work.add(bufferB);
@@ -142,7 +145,7 @@
     DtxBuffer::shared_ptr bufferC(new DtxBuffer());
     bufferC->enlist(static_pointer_cast<TxOp>(opC));
     bufferC->markEnded();
-        
+
     DtxWorkRecord work("my-xid", &store);
     work.add(bufferA);
     work.add(bufferB);
@@ -171,7 +174,7 @@
     DtxBuffer::shared_ptr bufferB(new DtxBuffer());
     bufferB->enlist(static_pointer_cast<TxOp>(opB));
     bufferB->markEnded();
-        
+
     DtxWorkRecord work("my-xid", &store);
     work.add(bufferA);
     work.add(bufferB);
@@ -187,3 +190,4 @@
 
 QPID_AUTO_TEST_SUITE_END()
 
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/ExchangeTest.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/ExchangeTest.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/ExchangeTest.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/ExchangeTest.cpp Wed Sep  9 19:46:56 2009
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -39,9 +39,12 @@
 using namespace qpid::sys;
 using namespace qpid;
 
+namespace qpid {
+namespace tests {
+
 QPID_AUTO_TEST_SUITE(ExchangeTestSuite)
 
-QPID_AUTO_TEST_CASE(testMe) 
+QPID_AUTO_TEST_CASE(testMe)
 {
     Queue::shared_ptr queue(new Queue("queue", true));
     Queue::shared_ptr queue2(new Queue("queue2", true));
@@ -70,7 +73,7 @@
     Queue::shared_ptr b(new Queue("b", true));
     Queue::shared_ptr c(new Queue("c", true));
     Queue::shared_ptr d(new Queue("d", true));
-        
+
     string k1("abc");
     string k2("def");
     string k3("xyz");
@@ -139,7 +142,7 @@
     headers.bind(a, "", &args3);
     headers.bind(b, "", &args2);
     headers.bind(c, "", &args1);
-        
+
     BOOST_CHECK(headers.isBound(a, 0, 0));
     BOOST_CHECK(headers.isBound(a, 0, &args1));
     BOOST_CHECK(headers.isBound(a, 0, &args3));
@@ -153,7 +156,7 @@
     BOOST_CHECK(!headers.isBound(d, 0, &args3));
 }
 
-QPID_AUTO_TEST_CASE(testDeleteGetAndRedeclare) 
+QPID_AUTO_TEST_CASE(testDeleteGetAndRedeclare)
 {
     ExchangeRegistry exchanges;
     exchanges.declare("my-exchange", "direct", false, FieldTable());
@@ -162,7 +165,7 @@
         exchanges.get("my-exchange");
     } catch (const NotFoundException&) {}
     std::pair<Exchange::shared_ptr, bool> response = exchanges.declare("my-exchange", "direct", false, FieldTable());
-    BOOST_CHECK_EQUAL(string("direct"), response.first->getType());  
+    BOOST_CHECK_EQUAL(string("direct"), response.first->getType());
 }
 
 intrusive_ptr<Message> cmessage(std::string exchange, std::string routingKey) {
@@ -175,7 +178,7 @@
     return msg;
 }
 
-QPID_AUTO_TEST_CASE(testSequenceOptions) 
+QPID_AUTO_TEST_CASE(testSequenceOptions)
 {
     FieldTable args;
     args.setInt("qpid.msg_sequence",1);
@@ -225,22 +228,22 @@
         direct.encode(buffer);
     }
     {
-        
+
         ExchangeRegistry exchanges;
         buffer.reset();
         DirectExchange::shared_ptr exch_dec = Exchange::decode(exchanges, buffer);
-        
+
         intrusive_ptr<Message> msg1 = cmessage("e", "A");
         DeliverableMessage dmsg1(msg1);
         exch_dec->route(dmsg1, "abc", 0);
 
         BOOST_CHECK_EQUAL(4, msg1->getApplicationHeaders()->getAsInt64("qpid.msg_sequence"));
-    
+
     }
     delete [] buff;
 }
 
-QPID_AUTO_TEST_CASE(testIVEOption) 
+QPID_AUTO_TEST_CASE(testIVEOption)
 {
     FieldTable args;
     args.setInt("qpid.ive",1);
@@ -248,7 +251,7 @@
     FanOutExchange fanout("fanout1", false, args);
     HeadersExchange header("headers1", false, args);
     TopicExchange topic ("topic1", false, args);
-    
+
     intrusive_ptr<Message> msg1 = cmessage("direct1", "abc");
     msg1->getProperties<MessageProperties>()->getApplicationHeaders().setString("a", "abc");
     DeliverableMessage dmsg1(msg1);
@@ -256,7 +259,7 @@
     FieldTable args2;
     args2.setString("x-match", "any");
     args2.setString("a", "abc");
-    
+
     direct.route(dmsg1, "abc", 0);
     fanout.route(dmsg1, "abc", 0);
     header.route(dmsg1, "abc", &args2);
@@ -265,20 +268,22 @@
     Queue::shared_ptr queue1(new Queue("queue1", true));
     Queue::shared_ptr queue2(new Queue("queue2", true));
     Queue::shared_ptr queue3(new Queue("queue3", true));
-    
+
     BOOST_CHECK(HeadersExchange::match(args2, msg1->getProperties<MessageProperties>()->getApplicationHeaders()));
-    
+
     BOOST_CHECK(direct.bind(queue, "abc", 0));
     BOOST_CHECK(fanout.bind(queue1, "abc", 0));
     BOOST_CHECK(header.bind(queue2, "", &args2));
     BOOST_CHECK(topic.bind(queue3, "abc", 0));
-    
+
     BOOST_CHECK_EQUAL(1u,queue->getMessageCount());
     BOOST_CHECK_EQUAL(1u,queue1->getMessageCount());
     BOOST_CHECK_EQUAL(1u,queue2->getMessageCount());
     BOOST_CHECK_EQUAL(1u,queue3->getMessageCount());
-    
+
 }
 
 
 QPID_AUTO_TEST_SUITE_END()
+
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/FieldTable.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/FieldTable.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/FieldTable.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/FieldTable.cpp Wed Sep  9 19:46:56 2009
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -29,6 +29,9 @@
 
 using namespace qpid::framing;
 
+namespace qpid {
+namespace tests {
+
 QPID_AUTO_TEST_SUITE(FieldTableTestSuite)
 
 QPID_AUTO_TEST_CASE(testMe)
@@ -57,7 +60,7 @@
     a.setInt("B", 1234);
     b = a;
     a.setString("A", "CCCC");
-    
+
     BOOST_CHECK(string("CCCC") == a.getAsString("A"));
     BOOST_CHECK(string("BBBB") == b.getAsString("A"));
     BOOST_CHECK_EQUAL(1234, a.getAsInt("B"));
@@ -69,7 +72,7 @@
     {
         FieldTable c;
         c = a;
-        
+
         char* buff = static_cast<char*>(::alloca(c.encodedSize()));
         Buffer wbuffer(buff, c.encodedSize());
         wbuffer.put(c);
@@ -102,7 +105,7 @@
         list.push_back(List::ValuePtr(new Unsigned32Value(u)));
         list.push_back(List::ValuePtr(new Str8Value("yellow")));
         list.push_back(List::ValuePtr(new DoubleValue(d)));
-        
+
         a.setString("id", "A");
         b.setString("id", "B");
         a.setTable("B", b);
@@ -192,7 +195,7 @@
     FieldTable args;
     args.setInt64("a",100);
     args.setInt64("b",-(int64_t) ((int64_t) 1<<34));
-    
+
     args.setUInt64("c",1u);
     args.setUInt64("d",(uint64_t) ((uint64_t) 1<<34));
     BOOST_CHECK_EQUAL(1u, args.getAsUInt64("c"));
@@ -204,5 +207,7 @@
     BOOST_CHECK_EQUAL((int64_t) ((int64_t) 1<<34), args.getAsInt64("d"));
 
 }
- 
+
 QPID_AUTO_TEST_SUITE_END()
+
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/FieldValue.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/FieldValue.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/FieldValue.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/FieldValue.cpp Wed Sep  9 19:46:56 2009
@@ -6,9 +6,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -20,6 +20,9 @@
 
 #include "unit_test.h"
 
+namespace qpid {
+namespace tests {
+
 QPID_AUTO_TEST_SUITE(FieldValueTestSuite)
 
 using namespace qpid::framing;
@@ -32,7 +35,7 @@
 
 QPID_AUTO_TEST_CASE(testStr16ValueEquals)
 {
-    
+
     BOOST_CHECK(Str16Value("abc") == s);
     BOOST_CHECK(Str16Value("foo") != s);
     BOOST_CHECK(s != i);
@@ -73,7 +76,7 @@
     BOOST_CHECK_EQUAL(std::string("FOO"),
                             ft.getValue().getString("foo"));
     BOOST_CHECK_EQUAL(7, ft.getValue().getInt("magic"));
-    
+
     FieldTableValue f2;
     BOOST_CHECK(ft != f2);
     f2.getValue().setString("foo", "FOO");
@@ -88,3 +91,5 @@
 #endif
 
 QPID_AUTO_TEST_SUITE_END()
+
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/ForkedBroker.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/ForkedBroker.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/ForkedBroker.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/ForkedBroker.cpp Wed Sep  9 19:46:56 2009
@@ -30,6 +30,16 @@
 using namespace std;
 using qpid::ErrnoException;
 
+namespace std {
+static ostream& operator<<(ostream& o, const qpid::tests::ForkedBroker::Args& a) {
+copy(a.begin(), a.end(), ostream_iterator<string>(o, " "));
+return o;
+}
+}
+
+namespace qpid {
+namespace tests {
+
 ForkedBroker::ForkedBroker(const Args& constArgs) {
     Args args(constArgs);
     Args::iterator i = find(args.begin(), args.end(), string("TMP_DATA_DIR"));
@@ -71,12 +81,6 @@
         throw qpid::Exception(QPID_MSG("Forked broker exited with: " << WEXITSTATUS(status)));
 }
 
-namespace std {
-static ostream& operator<<(ostream& o, const ForkedBroker::Args& a) {
-    copy(a.begin(), a.end(), ostream_iterator<string>(o, " "));
-    return o;
-}
-
 bool isLogOption(const std::string& s) {
     const char * log_enable = "--log-enable",
                * trace      = "--trace";
@@ -85,8 +89,6 @@
           );
 }
 
-}
-
 void ForkedBroker::init(const Args& userArgs) {
     using qpid::ErrnoException;
     port = 0;
@@ -125,3 +127,5 @@
         ::exit(1);
     }
 }
+
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/ForkedBroker.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/ForkedBroker.h?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/ForkedBroker.h (original)
+++ qpid/trunk/qpid/cpp/src/tests/ForkedBroker.h Wed Sep  9 19:46:56 2009
@@ -11,9 +11,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -31,9 +31,12 @@
 #include <stdio.h>
 #include <sys/wait.h>
 
+namespace qpid {
+namespace tests {
+
 /**
  * Class to fork a broker child process.
- * 
+ *
  * For most tests a BrokerFixture may be more convenient as it starts
  * a broker in the same process which allows you to easily debug into
  * the broker.
@@ -42,17 +45,17 @@
  * those brokers can't coexist in the same process (e.g. for cluster
  * tests where CPG doesn't allow multiple group members in a single
  * process.)
- * 
+ *
  */
 class ForkedBroker {
   public:
     typedef std::vector<std::string> Args;
 
     // argv args are passed to broker.
-    // 
+    //
     // Special value "TMP_DATA_DIR" is substituted with a temporary
     // data directory for the broker.
-    // 
+    //
     ForkedBroker(const Args& argv);
     ~ForkedBroker();
 
@@ -70,4 +73,6 @@
     std::string dataDir;
 };
 
+}} // namespace qpid::tests
+
 #endif  /*!TESTS_FORKEDBROKER_H*/

Modified: qpid/trunk/qpid/cpp/src/tests/Frame.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/Frame.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/Frame.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/Frame.cpp Wed Sep  9 19:46:56 2009
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -23,6 +23,9 @@
 #include <boost/lexical_cast.hpp>
 #include "unit_test.h"
 
+namespace qpid {
+namespace tests {
+
 QPID_AUTO_TEST_SUITE(FrameTestSuite)
 
 using namespace std;
@@ -78,3 +81,5 @@
 }
 
 QPID_AUTO_TEST_SUITE_END()
+
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/FrameDecoder.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/FrameDecoder.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/FrameDecoder.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/FrameDecoder.cpp Wed Sep  9 19:46:56 2009
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -27,6 +27,9 @@
 #include <string>
 
 
+namespace qpid {
+namespace tests {
+
 QPID_AUTO_TEST_SUITE(FrameDecoderTest)
 
 using namespace std;
@@ -69,5 +72,7 @@
 }
 
 
-                    
+
 QPID_AUTO_TEST_SUITE_END()
+
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/FramingTest.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/FramingTest.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/FramingTest.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/FramingTest.cpp Wed Sep  9 19:46:56 2009
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -39,8 +39,11 @@
 using namespace qpid::framing;
 using namespace std;
 
+namespace qpid {
+namespace tests {
+
 template <class T>
-std::string tostring(const T& x) 
+std::string tostring(const T& x)
 {
     std::ostringstream out;
     out << x;
@@ -49,7 +52,7 @@
 
 QPID_AUTO_TEST_SUITE(FramingTestSuite)
 
-QPID_AUTO_TEST_CASE(testMessageTransferBody) 
+QPID_AUTO_TEST_CASE(testMessageTransferBody)
 {
     char buffer[1024];
     ProtocolVersion version(highestProtocolVersion);
@@ -62,8 +65,8 @@
     out.decode(rbuff);
     BOOST_CHECK_EQUAL(tostring(in), tostring(out));
 }
-    
-QPID_AUTO_TEST_CASE(testConnectionSecureBody) 
+
+QPID_AUTO_TEST_CASE(testConnectionSecureBody)
 {
     char buffer[1024];
     ProtocolVersion version(highestProtocolVersion);
@@ -88,10 +91,10 @@
     Array hosts(0x95);
     hosts.add(boost::shared_ptr<FieldValue>(new Str16Value(a)));
     hosts.add(boost::shared_ptr<FieldValue>(new Str16Value(b)));
-        
+
     ConnectionRedirectBody in(version, a, hosts);
     in.encode(wbuff);
-        
+
     Buffer rbuff(buffer, sizeof(buffer));
     ConnectionRedirectBody out(version);
     out.decode(rbuff);
@@ -111,7 +114,7 @@
     out.decode(rbuff);
     BOOST_CHECK_EQUAL(tostring(in), tostring(out));
 }
-    
+
 QPID_AUTO_TEST_CASE(testConnectionRedirectBodyFrame)
 {
     char buffer[1024];
@@ -122,7 +125,7 @@
     Array hosts(0x95);
     hosts.add(boost::shared_ptr<FieldValue>(new Str16Value(a)));
     hosts.add(boost::shared_ptr<FieldValue>(new Str16Value(b)));
-        
+
     AMQFrame in((ConnectionRedirectBody(version, a, hosts)));
     in.setChannel(999);
     in.encode(wbuff);
@@ -149,3 +152,5 @@
 }
 
 QPID_AUTO_TEST_SUITE_END()
+
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/HeaderTest.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/HeaderTest.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/HeaderTest.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/HeaderTest.cpp Wed Sep  9 19:46:56 2009
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -26,9 +26,12 @@
 using namespace qpid::framing;
 using namespace std;
 
+namespace qpid {
+namespace tests {
+
 QPID_AUTO_TEST_SUITE(HeaderTestSuite)
 
-QPID_AUTO_TEST_CASE(testGenericProperties) 
+QPID_AUTO_TEST_CASE(testGenericProperties)
 {
     AMQHeaderBody body;
     body.get<MessageProperties>(true)->getApplicationHeaders().setString(
@@ -47,10 +50,10 @@
         props->getApplicationHeaders().get("A")->get<string>());
 }
 
-QPID_AUTO_TEST_CASE(testMessageProperties) 
+QPID_AUTO_TEST_CASE(testMessageProperties)
 {
     AMQFrame out((AMQHeaderBody()));
-    MessageProperties* props1 = 
+    MessageProperties* props1 =
         out.castBody<AMQHeaderBody>()->get<MessageProperties>(true);
 
     props1->setContentLength(42);
@@ -82,10 +85,10 @@
 
 }
 
-QPID_AUTO_TEST_CASE(testDeliveryProperies) 
+QPID_AUTO_TEST_CASE(testDeliveryProperies)
 {
     AMQFrame out((AMQHeaderBody()));
-    DeliveryProperties* props1 = 
+    DeliveryProperties* props1 =
         out.castBody<AMQHeaderBody>()->get<DeliveryProperties>(true);
 
     props1->setDiscardUnroutable(true);
@@ -108,3 +111,4 @@
 
 QPID_AUTO_TEST_SUITE_END()
 
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/HeadersExchangeTest.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/HeadersExchangeTest.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/HeadersExchangeTest.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/HeadersExchangeTest.cpp Wed Sep  9 19:46:56 2009
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -28,9 +28,12 @@
 using namespace qpid::broker;
 using namespace qpid::framing;
 
+namespace qpid {
+namespace tests {
+
 QPID_AUTO_TEST_SUITE(HeadersExchangeTestSuite)
-    
-QPID_AUTO_TEST_CASE(testMatchAll) 
+
+QPID_AUTO_TEST_CASE(testMatchAll)
 {
     FieldTable b, m, n;
     b.setString("x-match", "all");
@@ -43,7 +46,7 @@
     // Ignore extras.
     m.setString("extra", "x");
     BOOST_CHECK(HeadersExchange::match(b, m));
-        
+
     // Fail mismatch, wrong value.
     m.setString("foo", "NotFoo");
     BOOST_CHECK(!HeadersExchange::match(b, m));
@@ -54,7 +57,7 @@
     BOOST_CHECK(!HeadersExchange::match(b, n));
 }
 
-QPID_AUTO_TEST_CASE(testMatchAny) 
+QPID_AUTO_TEST_CASE(testMatchAny)
 {
     FieldTable b, m, n;
     b.setString("x-match", "any");
@@ -67,7 +70,7 @@
     BOOST_CHECK(HeadersExchange::match(b, m));
 }
 
-QPID_AUTO_TEST_CASE(testMatchEmptyValue) 
+QPID_AUTO_TEST_CASE(testMatchEmptyValue)
 {
     FieldTable b, m;
     b.setString("x-match", "all");
@@ -82,23 +85,23 @@
 {
     FieldTable b, m;
     m.setString("foo", "FOO");
-        
+
     b.setString("x-match", "all");
     BOOST_CHECK(HeadersExchange::match(b, m));
     b.setString("x-match", "any");
     BOOST_CHECK(!HeadersExchange::match(b, m));
 }
-    
 
-QPID_AUTO_TEST_CASE(testMatchNoXMatch) 
+
+QPID_AUTO_TEST_CASE(testMatchNoXMatch)
 {
     FieldTable b, m;
     b.setString("foo", "FOO");
     m.setString("foo", "FOO");
     BOOST_CHECK(!HeadersExchange::match(b, m));
 }
-    
-QPID_AUTO_TEST_CASE(testBindNoXMatch) 
+
+QPID_AUTO_TEST_CASE(testBindNoXMatch)
 {
     HeadersExchange exchange("test");
     Queue::shared_ptr queue;
@@ -112,4 +115,6 @@
     }
 }
 
-QPID_AUTO_TEST_SUITE_END()    
+QPID_AUTO_TEST_SUITE_END()
+
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/IncompleteMessageList.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/IncompleteMessageList.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/IncompleteMessageList.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/IncompleteMessageList.cpp Wed Sep  9 19:46:56 2009
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -27,6 +27,9 @@
 
 #include "unit_test.h"
 
+namespace qpid {
+namespace tests {
+
 QPID_AUTO_TEST_SUITE(IncompleteMessageListTestSuite)
 
 using namespace qpid::broker;
@@ -41,7 +44,7 @@
     Checker(uint start, uint end) {
         for (uint i = start; i <= end; i++) {
             ids.push_back(i);
-        }        
+        }
     }
 
     Checker& expect(const SequenceNumber& id) {
@@ -49,11 +52,11 @@
         return *this;
     }
 
-    void operator()(boost::intrusive_ptr<Message> msg) { 
+    void operator()(boost::intrusive_ptr<Message> msg) {
         BOOST_CHECK(!ids.empty());
         BOOST_CHECK_EQUAL(msg->getCommandId(), ids.front());
         ids.pop_front();
-    } 
+    }
 };
 
 QPID_AUTO_TEST_CASE(testProcessSimple)
@@ -91,7 +94,7 @@
     list.process(Checker(1, 2), false);
     //mark message complete and re-process to get remaining messages sent to listener
     middle->enqueueComplete();
-    list.process(Checker(3, 5), false);    
+    list.process(Checker(3, 5), false);
 }
 
 
@@ -127,3 +130,5 @@
 }
 
 QPID_AUTO_TEST_SUITE_END()
+
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/InlineAllocator.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/InlineAllocator.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/InlineAllocator.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/InlineAllocator.cpp Wed Sep  9 19:46:56 2009
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -22,6 +22,9 @@
 #include "qpid/InlineAllocator.h"
 #include "unit_test.h"
 
+namespace qpid {
+namespace tests {
+
 QPID_AUTO_TEST_SUITE(InlineAllocatorTestSuite)
 
 using namespace qpid;
@@ -48,16 +51,18 @@
 
     char* p = alloc.allocate(1);
     BOOST_CHECK(p == (char*)&alloc);
-    
+
     char* q = alloc.allocate(1);
     BOOST_CHECK(q != (char*)&alloc);
 
     alloc.deallocate(p,1);
     p = alloc.allocate(1);
     BOOST_CHECK(p == (char*)&alloc);
-    
+
     alloc.deallocate(p,1);
     alloc.deallocate(q,1);
 }
 
 QPID_AUTO_TEST_SUITE_END()
+
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/InlineVector.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/InlineVector.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/InlineVector.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/InlineVector.cpp Wed Sep  9 19:46:56 2009
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -22,6 +22,9 @@
 #include "qpid/InlineVector.h"
 #include "unit_test.h"
 
+namespace qpid {
+namespace tests {
+
 QPID_AUTO_TEST_SUITE(InlineVectorTestSuite)
 
 using namespace qpid;
@@ -117,7 +120,9 @@
 QPID_AUTO_TEST_CASE(testResize) {
     Vec v;
     v.resize(5);
-    BOOST_CHECK(!isInline(v));    
+    BOOST_CHECK(!isInline(v));
 }
 
 QPID_AUTO_TEST_SUITE_END()
+
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/ManagementTest.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/ManagementTest.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/ManagementTest.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/ManagementTest.cpp Wed Sep  9 19:46:56 2009
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -24,6 +24,9 @@
 #include "qpid/console/ObjectId.h"
 #include "unit_test.h"
 
+namespace qpid {
+namespace tests {
+
 QPID_AUTO_TEST_SUITE(ManagementTestSuite)
 
 using namespace qpid::framing;
@@ -109,4 +112,4 @@
 
 QPID_AUTO_TEST_SUITE_END()
 
-
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/MessageBuilderTest.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/MessageBuilderTest.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/MessageBuilderTest.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/MessageBuilderTest.cpp Wed Sep  9 19:46:56 2009
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -31,15 +31,18 @@
 using namespace qpid::framing;
 using namespace qpid::sys;
 
+namespace qpid {
+namespace tests {
+
 class MockMessageStore : public NullMessageStore
 {
     enum Op {STAGE=1, APPEND=2};
 
     uint64_t id;
-    boost::intrusive_ptr<PersistableMessage> expectedMsg;        
+    boost::intrusive_ptr<PersistableMessage> expectedMsg;
     string expectedData;
     std::list<Op> ops;
-        
+
     void checkExpectation(Op actual)
     {
         BOOST_CHECK_EQUAL(ops.front(), actual);
@@ -49,17 +52,17 @@
   public:
     MockMessageStore() : id(0), expectedMsg(0) {}
 
-    void expectStage(PersistableMessage& msg) 
-    { 
+    void expectStage(PersistableMessage& msg)
+    {
         expectedMsg = &msg;
-        ops.push_back(STAGE); 
+        ops.push_back(STAGE);
     }
 
-    void expectAppendContent(PersistableMessage& msg, const string& data) 
-    { 
+    void expectAppendContent(PersistableMessage& msg, const string& data)
+    {
         expectedMsg = &msg;
         expectedData = data;
-        ops.push_back(APPEND); 
+        ops.push_back(APPEND);
     }
 
     void stage(const boost::intrusive_ptr<PersistableMessage>& msg)
@@ -74,7 +77,7 @@
     {
         checkExpectation(APPEND);
         BOOST_CHECK_EQUAL(boost::static_pointer_cast<const PersistableMessage>(expectedMsg), msg);
-        BOOST_CHECK_EQUAL(expectedData, data);            
+        BOOST_CHECK_EQUAL(expectedData, data);
     }
 
     bool expectationsMet()
@@ -89,7 +92,7 @@
     }
 
 };
-    
+
 QPID_AUTO_TEST_SUITE(MessageBuilderTestSuite)
 
 QPID_AUTO_TEST_CASE(testHeaderOnly)
@@ -103,7 +106,7 @@
     AMQFrame method((MessageTransferBody(ProtocolVersion(), exchange, 0, 0)));
     AMQFrame header((AMQHeaderBody()));
 
-    header.castBody<AMQHeaderBody>()->get<MessageProperties>(true)->setContentLength(0);        
+    header.castBody<AMQHeaderBody>()->get<MessageProperties>(true)->setContentLength(0);
     header.castBody<AMQHeaderBody>()->get<DeliveryProperties>(true)->setRoutingKey(key);
 
     builder.handle(method);
@@ -132,7 +135,7 @@
     header.setEof(false);
     content.setBof(false);
 
-    header.castBody<AMQHeaderBody>()->get<MessageProperties>(true)->setContentLength(data.size());        
+    header.castBody<AMQHeaderBody>()->get<MessageProperties>(true)->setContentLength(data.size());
     header.castBody<AMQHeaderBody>()->get<DeliveryProperties>(true)->setRoutingKey(key);
 
     builder.handle(method);
@@ -143,7 +146,7 @@
     BOOST_CHECK(builder.getMessage());
     BOOST_CHECK(!builder.getMessage()->getFrames().isComplete());
 
-    builder.handle(content);        
+    builder.handle(content);
     BOOST_CHECK(builder.getMessage());
     BOOST_CHECK(builder.getMessage()->getFrames().isComplete());
 }
@@ -169,7 +172,7 @@
     content1.setEof(false);
     content2.setBof(false);
 
-    header.castBody<AMQHeaderBody>()->get<MessageProperties>(true)->setContentLength(data1.size() + data2.size());        
+    header.castBody<AMQHeaderBody>()->get<MessageProperties>(true)->setContentLength(data1.size() + data2.size());
     header.castBody<AMQHeaderBody>()->get<DeliveryProperties>(true)->setRoutingKey(key);
 
     builder.handle(method);
@@ -188,7 +191,7 @@
     MockMessageStore store;
     MessageBuilder builder(&store, 5);
     builder.start(SequenceNumber());
-        
+
     std::string data1("abcdefg");
     std::string data2("hijklmn");
     std::string exchange("builder-exchange");
@@ -199,7 +202,7 @@
     AMQFrame content1((AMQContentBody(data1)));
     AMQFrame content2((AMQContentBody(data2)));
 
-    header.castBody<AMQHeaderBody>()->get<MessageProperties>(true)->setContentLength(data1.size() + data2.size());        
+    header.castBody<AMQHeaderBody>()->get<MessageProperties>(true)->setContentLength(data1.size() + data2.size());
     header.castBody<AMQHeaderBody>()->get<DeliveryProperties>(true)->setRoutingKey(key);
 
     builder.handle(method);
@@ -223,7 +226,7 @@
     MockMessageStore store;
     MessageBuilder builder(&store, 5);
     builder.start(SequenceNumber());
-        
+
     std::string data1("abcdefg");
     std::string exchange("qpid.management");
     std::string key("builder-exchange");
@@ -232,7 +235,7 @@
     AMQFrame header((AMQHeaderBody()));
     AMQFrame content1((AMQContentBody(data1)));
 
-    header.castBody<AMQHeaderBody>()->get<MessageProperties>(true)->setContentLength(data1.size());        
+    header.castBody<AMQHeaderBody>()->get<MessageProperties>(true)->setContentLength(data1.size());
     header.castBody<AMQHeaderBody>()->get<DeliveryProperties>(true)->setRoutingKey(key);
 
     builder.handle(method);
@@ -242,4 +245,7 @@
     BOOST_CHECK(store.expectationsMet());
     BOOST_CHECK_EQUAL((uint64_t) 0, builder.getMessage()->getPersistenceId());
 }
+
 QPID_AUTO_TEST_SUITE_END()
+
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/MessageReplayTracker.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/MessageReplayTracker.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/MessageReplayTracker.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/MessageReplayTracker.cpp Wed Sep  9 19:46:56 2009
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -23,6 +23,9 @@
 #include "qpid/client/MessageReplayTracker.h"
 #include "qpid/sys/Time.h"
 
+namespace qpid {
+namespace tests {
+
 QPID_AUTO_TEST_SUITE(MessageReplayTrackerTests)
 
 using namespace qpid::client;
@@ -53,8 +56,8 @@
 
     MessageReplayTracker tracker(10);
     tracker.init(fix.session);
-    for (uint i = 0; i < 5; i++) {        
-        Message message((boost::format("Message_%1%") % (i+1)).str(), "my-queue");        
+    for (uint i = 0; i < 5; i++) {
+        Message message((boost::format("Message_%1%") % (i+1)).str(), "my-queue");
         tracker.send(message);
     }
     ReplayBufferChecker checker(1, 10);
@@ -62,7 +65,7 @@
 
     tracker.replay(fix.session);
     for (uint j = 0; j < 2; j++) {//each message should have been sent twice
-        for (uint i = 0; i < 5; i++) {        
+        for (uint i = 0; i < 5; i++) {
             Message m;
             BOOST_CHECK(fix.subs.get(m, "my-queue", TIME_SEC));
             BOOST_CHECK_EQUAL((boost::format("Message_%1%") % (i+1)).str(), m.getData());
@@ -79,15 +82,15 @@
 
     MessageReplayTracker tracker(10);
     tracker.init(fix.session);
-    for (uint i = 0; i < 5; i++) {        
-        Message message((boost::format("Message_%1%") % (i+1)).str(), "my-queue");        
+    for (uint i = 0; i < 5; i++) {
+        Message message((boost::format("Message_%1%") % (i+1)).str(), "my-queue");
         tracker.send(message);
     }
     fix.session.sync();//ensures all messages are complete
     tracker.checkCompletion();
     tracker.replay(fix.session);
     Message received;
-    for (uint i = 0; i < 5; i++) {        
+    for (uint i = 0; i < 5; i++) {
         BOOST_CHECK(fix.subs.get(received, "my-queue"));
         BOOST_CHECK_EQUAL((boost::format("Message_%1%") % (i+1)).str(), received.getData());
     }
@@ -96,4 +99,4 @@
 
 QPID_AUTO_TEST_SUITE_END()
 
-
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/MessageTest.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/MessageTest.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/MessageTest.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/MessageTest.cpp Wed Sep  9 19:46:56 2009
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -33,6 +33,9 @@
 using namespace qpid::broker;
 using namespace qpid::framing;
 
+namespace qpid {
+namespace tests {
+
 QPID_AUTO_TEST_SUITE(MessageTestSuite)
 
 QPID_AUTO_TEST_CASE(testEncodeDecode)
@@ -56,7 +59,7 @@
     msg->getFrames().append(content2);
 
     MessageProperties* mProps = msg->getFrames().getHeaders()->get<MessageProperties>(true);
-    mProps->setContentLength(data1.size() + data2.size());        
+    mProps->setContentLength(data1.size() + data2.size());
     mProps->setMessageId(messageId);
     FieldTable applicationHeaders;
     applicationHeaders.setString("abc", "xyz");
@@ -69,7 +72,7 @@
     char* buff = static_cast<char*>(::alloca(msg->encodedSize()));
     Buffer wbuffer(buff, msg->encodedSize());
     msg->encode(wbuffer);
-        
+
     Buffer rbuffer(buff, msg->encodedSize());
     msg = new Message();
     msg->decodeHeader(rbuffer);
@@ -86,3 +89,4 @@
 
 QPID_AUTO_TEST_SUITE_END()
 
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/MessageUtils.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/MessageUtils.h?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/MessageUtils.h (original)
+++ qpid/trunk/qpid/cpp/src/tests/MessageUtils.h Wed Sep  9 19:46:56 2009
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -28,9 +28,12 @@
 using namespace broker;
 using namespace framing;
 
+namespace qpid {
+namespace tests {
+
 struct MessageUtils
 {
-    static boost::intrusive_ptr<Message> createMessage(const string& exchange="", const string& routingKey="", 
+    static boost::intrusive_ptr<Message> createMessage(const string& exchange="", const string& routingKey="",
                                                        const Uuid& messageId=Uuid(true), uint64_t contentSize = 0)
     {
         boost::intrusive_ptr<broker::Message> msg(new broker::Message());
@@ -41,7 +44,7 @@
         msg->getFrames().append(method);
         msg->getFrames().append(header);
         MessageProperties* props = msg->getFrames().getHeaders()->get<MessageProperties>(true);
-        props->setContentLength(contentSize);        
+        props->setContentLength(contentSize);
         props->setMessageId(messageId);
         msg->getFrames().getHeaders()->get<DeliveryProperties>(true)->setRoutingKey(routingKey);
         return msg;
@@ -53,3 +56,5 @@
         msg->getFrames().append(content);
     }
 };
+
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/MessagingSessionTests.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/MessagingSessionTests.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/MessagingSessionTests.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/MessagingSessionTests.cpp Wed Sep  9 19:46:56 2009
@@ -7,9 +7,9 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -36,6 +36,9 @@
 #include <string>
 #include <vector>
 
+namespace qpid {
+namespace tests {
+
 QPID_AUTO_TEST_SUITE(MessagingSessionTests)
 
 using namespace qpid::messaging;
@@ -86,7 +89,7 @@
     Session session;
     BrokerAdmin admin;
 
-    MessagingFixture(Broker::Options opts = Broker::Options()) : 
+    MessagingFixture(Broker::Options opts = Broker::Options()) :
         BrokerFixture(opts),
         connection(Connection::open((boost::format("amqp:tcp:localhost:%1%") % (broker->getPort(Broker::TCP_TRANSPORT))).str())),
         session(connection.newSession()),
@@ -133,7 +136,7 @@
 
 struct MultiQueueFixture : MessagingFixture
 {
-    typedef std::vector<std::string>::const_iterator const_iterator; 
+    typedef std::vector<std::string>::const_iterator const_iterator;
     std::vector<std::string> queues;
 
     MultiQueueFixture(const std::vector<std::string>& names = boost::assign::list_of<std::string>("q1")("q2")("q3")) : queues(names)
@@ -161,7 +164,7 @@
     }
 };
 
-std::vector<std::string> fetch(Receiver& receiver, int count, qpid::sys::Duration timeout=qpid::sys::TIME_SEC*5) 
+std::vector<std::string> fetch(Receiver& receiver, int count, qpid::sys::Duration timeout=qpid::sys::TIME_SEC*5)
 {
     std::vector<std::string> data;
     Message message;
@@ -189,7 +192,7 @@
     Sender sender = fix.session.createSender(fix.queue);
     Message out("test-message");
     for (uint i = 0; i < 10; ++i) {
-        out.getHeaders()["a"] = i; 
+        out.getHeaders()["a"] = i;
         sender.send(out);
     }
     Receiver receiver = fix.session.createReceiver(fix.queue);
@@ -249,14 +252,14 @@
     Message in;
     BOOST_CHECK(!sub2.fetch(in, 0));//TODO: or should this raise an error?
 
-    
+
     //TODO: check pending messages...
 }
 
 QPID_AUTO_TEST_CASE(testSessionFetch)
 {
     MultiQueueFixture fix;
-    
+
     for (uint i = 0; i < fix.queues.size(); i++) {
         Receiver r = fix.session.createReceiver(fix.queues[i]);
         r.setCapacity(10u);
@@ -267,8 +270,8 @@
         Sender s = fix.session.createSender(fix.queues[i]);
         Message msg((boost::format("Message_%1%") % (i+1)).str());
         s.send(msg);
-    }    
-    
+    }
+
     for (uint i = 0; i < fix.queues.size(); i++) {
         Message msg;
         BOOST_CHECK(fix.session.fetch(msg, qpid::sys::TIME_SEC));
@@ -279,7 +282,7 @@
 QPID_AUTO_TEST_CASE(testSessionDispatch)
 {
     MultiQueueFixture fix;
-    
+
     MessageDataCollector collector;
     for (uint i = 0; i < fix.queues.size(); i++) {
         Receiver r = fix.session.createReceiver(fix.queues[i]);
@@ -292,10 +295,10 @@
         Sender s = fix.session.createSender(fix.queues[i]);
         Message msg((boost::format("Message_%1%") % (i+1)).str());
         s.send(msg);
-    }    
+    }
 
     while (fix.session.dispatch(qpid::sys::TIME_SEC)) ;
-    
+
     BOOST_CHECK_EQUAL(collector.messageData, boost::assign::list_of<std::string>("Message_1")("Message_2")("Message_3"));
 }
 
@@ -309,7 +312,7 @@
     out.getContent().asMap()["pi"] = 3.14f;
     sender.send(out);
     Receiver receiver = fix.session.createReceiver(fix.queue);
-    Message in = receiver.fetch(5 * qpid::sys::TIME_SEC);    
+    Message in = receiver.fetch(5 * qpid::sys::TIME_SEC);
     BOOST_CHECK_EQUAL(in.getContent().asMap()["abc"].asString(), "def");
     BOOST_CHECK_EQUAL(in.getContent().asMap()["pi"].asFloat(), 3.14f);
     fix.session.acknowledge();
@@ -324,11 +327,11 @@
     out.getContent() << "abc";
     out.getContent() << 1234;
     out.getContent() << "def";
-    out.getContent() << 56.789;    
+    out.getContent() << 56.789;
     sender.send(out);
     Receiver receiver = fix.session.createReceiver(fix.queue);
-    Message in = receiver.fetch(5 * qpid::sys::TIME_SEC);    
-    Variant::List& list = in.getContent().asList();    
+    Message in = receiver.fetch(5 * qpid::sys::TIME_SEC);
+    Variant::List& list = in.getContent().asList();
     BOOST_CHECK_EQUAL(list.size(), out.getContent().asList().size());
     BOOST_CHECK_EQUAL(list.front().asString(), "abc");
     list.pop_front();
@@ -354,7 +357,9 @@
     fix.session.reject(in);
     in = receiver.fetch(5 * qpid::sys::TIME_SEC);
     BOOST_CHECK_EQUAL(in.getBytes(), m2.getBytes());
-    fix.session.acknowledge();    
+    fix.session.acknowledge();
 }
 
 QPID_AUTO_TEST_SUITE_END()
+
+}} // namespace qpid::tests

Modified: qpid/trunk/qpid/cpp/src/tests/PartialFailure.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/PartialFailure.cpp?rev=813094&r1=813093&r2=813094&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/PartialFailure.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/PartialFailure.cpp Wed Sep  9 19:46:56 2009
@@ -31,6 +31,9 @@
 #include <boost/algorithm/string.hpp>
 #include <boost/bind.hpp>
 
+namespace qpid {
+namespace tests {
+
 QPID_AUTO_TEST_SUITE(PartialFailureTestSuite)
 
 using namespace std;
@@ -257,3 +260,5 @@
 #endif
 #endif  // FIXME aconway 2009-07-30:
 QPID_AUTO_TEST_SUITE_END()
+
+}} // namespace qpid::tests



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org