diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2012-05-16 22:28:22 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2012-05-16 22:28:22 +0000 |
| commit | b554a07a420bdc581ba8f0fcaef5851cc2359393 (patch) | |
| tree | db5cbf9a29b1b54a6408dae7ca737fa759b26199 /cpp/src/tests | |
| parent | e48b6fa55c0c52f6da6163ade16e70ea3603a9f5 (diff) | |
| download | qpid-python-b554a07a420bdc581ba8f0fcaef5851cc2359393.tar.gz | |
QPID-4005: Eliminate "using" especially "using namespace" from header file
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1339403 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests')
| -rw-r--r-- | cpp/src/tests/ExchangeTest.cpp | 2 | ||||
| -rw-r--r-- | cpp/src/tests/FieldTable.cpp | 2 | ||||
| -rw-r--r-- | cpp/src/tests/MessageBuilderTest.cpp | 6 | ||||
| -rw-r--r-- | cpp/src/tests/MessageTest.cpp | 2 | ||||
| -rw-r--r-- | cpp/src/tests/MessageUtils.h | 4 | ||||
| -rw-r--r-- | cpp/src/tests/QueueTest.cpp | 2 | ||||
| -rw-r--r-- | cpp/src/tests/TestMessageStore.h | 2 | ||||
| -rw-r--r-- | cpp/src/tests/TxPublishTest.cpp | 4 |
8 files changed, 16 insertions, 8 deletions
diff --git a/cpp/src/tests/ExchangeTest.cpp b/cpp/src/tests/ExchangeTest.cpp index 2fb284741a..66a16b9178 100644 --- a/cpp/src/tests/ExchangeTest.cpp +++ b/cpp/src/tests/ExchangeTest.cpp @@ -33,6 +33,8 @@ #include <iostream> #include "MessageUtils.h" +using std::string; + using boost::intrusive_ptr; using namespace qpid::broker; using namespace qpid::framing; diff --git a/cpp/src/tests/FieldTable.cpp b/cpp/src/tests/FieldTable.cpp index c79d110ae4..14f9eeb6e9 100644 --- a/cpp/src/tests/FieldTable.cpp +++ b/cpp/src/tests/FieldTable.cpp @@ -29,6 +29,8 @@ using namespace qpid::framing; +using std::string; + namespace qpid { namespace tests { diff --git a/cpp/src/tests/MessageBuilderTest.cpp b/cpp/src/tests/MessageBuilderTest.cpp index c3d40ed88a..9adb133d40 100644 --- a/cpp/src/tests/MessageBuilderTest.cpp +++ b/cpp/src/tests/MessageBuilderTest.cpp @@ -40,7 +40,7 @@ class MockMessageStore : public NullMessageStore uint64_t id; boost::intrusive_ptr<PersistableMessage> expectedMsg; - string expectedData; + std::string expectedData; std::list<Op> ops; void checkExpectation(Op actual) @@ -58,7 +58,7 @@ class MockMessageStore : public NullMessageStore ops.push_back(STAGE); } - void expectAppendContent(PersistableMessage& msg, const string& data) + void expectAppendContent(PersistableMessage& msg, const std::string& data) { expectedMsg = &msg; expectedData = data; @@ -73,7 +73,7 @@ class MockMessageStore : public NullMessageStore } void appendContent(const boost::intrusive_ptr<const PersistableMessage>& msg, - const string& data) + const std::string& data) { checkExpectation(APPEND); BOOST_CHECK_EQUAL(boost::static_pointer_cast<const PersistableMessage>(expectedMsg), msg); diff --git a/cpp/src/tests/MessageTest.cpp b/cpp/src/tests/MessageTest.cpp index 7d67c92b37..7dd74361a9 100644 --- a/cpp/src/tests/MessageTest.cpp +++ b/cpp/src/tests/MessageTest.cpp @@ -33,6 +33,8 @@ using namespace qpid::broker; using namespace qpid::framing; +using std::string; + namespace qpid { namespace tests { diff --git a/cpp/src/tests/MessageUtils.h b/cpp/src/tests/MessageUtils.h index a1b140d484..991e2a2714 100644 --- a/cpp/src/tests/MessageUtils.h +++ b/cpp/src/tests/MessageUtils.h @@ -33,7 +33,7 @@ namespace tests { struct MessageUtils { - static boost::intrusive_ptr<Message> createMessage(const string& exchange="", const string& routingKey="", + static boost::intrusive_ptr<Message> createMessage(const std::string& exchange="", const std::string& routingKey="", const bool durable = false, const Uuid& messageId=Uuid(true), uint64_t contentSize = 0) { @@ -53,7 +53,7 @@ struct MessageUtils return msg; } - static void addContent(boost::intrusive_ptr<Message> msg, const string& data) + static void addContent(boost::intrusive_ptr<Message> msg, const std::string& data) { AMQFrame content((AMQContentBody(data))); msg->getFrames().append(content); diff --git a/cpp/src/tests/QueueTest.cpp b/cpp/src/tests/QueueTest.cpp index 0058aa5133..db84614a9b 100644 --- a/cpp/src/tests/QueueTest.cpp +++ b/cpp/src/tests/QueueTest.cpp @@ -42,6 +42,8 @@ #include <iostream> #include "boost/format.hpp" +using std::string; + using boost::intrusive_ptr; using namespace qpid; using namespace qpid::broker; diff --git a/cpp/src/tests/TestMessageStore.h b/cpp/src/tests/TestMessageStore.h index 20e0b755b2..0b63bc9c15 100644 --- a/cpp/src/tests/TestMessageStore.h +++ b/cpp/src/tests/TestMessageStore.h @@ -31,7 +31,7 @@ using namespace qpid::framing; namespace qpid { namespace tests { -typedef std::pair<string, boost::intrusive_ptr<PersistableMessage> > msg_queue_pair; +typedef std::pair<std::string, boost::intrusive_ptr<PersistableMessage> > msg_queue_pair; class TestMessageStore : public NullMessageStore { diff --git a/cpp/src/tests/TxPublishTest.cpp b/cpp/src/tests/TxPublishTest.cpp index 152581e4ba..a636646035 100644 --- a/cpp/src/tests/TxPublishTest.cpp +++ b/cpp/src/tests/TxPublishTest.cpp @@ -69,9 +69,9 @@ QPID_AUTO_TEST_CASE(testPrepare) //ensure messages are enqueued in store t.op.prepare(0); BOOST_CHECK_EQUAL((size_t) 2, t.store.enqueued.size()); - BOOST_CHECK_EQUAL(string("queue1"), t.store.enqueued[0].first); + BOOST_CHECK_EQUAL(std::string("queue1"), t.store.enqueued[0].first); BOOST_CHECK_EQUAL(pmsg, t.store.enqueued[0].second); - BOOST_CHECK_EQUAL(string("queue2"), t.store.enqueued[1].first); + BOOST_CHECK_EQUAL(std::string("queue2"), t.store.enqueued[1].first); BOOST_CHECK_EQUAL(pmsg, t.store.enqueued[1].second); BOOST_CHECK_EQUAL( true, ( boost::static_pointer_cast<PersistableMessage>(t.msg))->isIngressComplete()); } |
