summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2012-05-16 22:28:22 +0000
committerAndrew Stitcher <astitcher@apache.org>2012-05-16 22:28:22 +0000
commit5c6e3d849a1918867af5b1fc3f41701383b8e464 (patch)
tree262064ad3ef062b92e98518189b7870ca8cfb6be /qpid/cpp/src/tests
parentde1185d179229780e37b38dae97fb900bd29fc18 (diff)
downloadqpid-python-5c6e3d849a1918867af5b1fc3f41701383b8e464.tar.gz
QPID-4005: Eliminate "using" especially "using namespace" from header file
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1339403 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests')
-rw-r--r--qpid/cpp/src/tests/ExchangeTest.cpp2
-rw-r--r--qpid/cpp/src/tests/FieldTable.cpp2
-rw-r--r--qpid/cpp/src/tests/MessageBuilderTest.cpp6
-rw-r--r--qpid/cpp/src/tests/MessageTest.cpp2
-rw-r--r--qpid/cpp/src/tests/MessageUtils.h4
-rw-r--r--qpid/cpp/src/tests/QueueTest.cpp2
-rw-r--r--qpid/cpp/src/tests/TestMessageStore.h2
-rw-r--r--qpid/cpp/src/tests/TxPublishTest.cpp4
8 files changed, 16 insertions, 8 deletions
diff --git a/qpid/cpp/src/tests/ExchangeTest.cpp b/qpid/cpp/src/tests/ExchangeTest.cpp
index 2fb284741a..66a16b9178 100644
--- a/qpid/cpp/src/tests/ExchangeTest.cpp
+++ b/qpid/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/qpid/cpp/src/tests/FieldTable.cpp b/qpid/cpp/src/tests/FieldTable.cpp
index c79d110ae4..14f9eeb6e9 100644
--- a/qpid/cpp/src/tests/FieldTable.cpp
+++ b/qpid/cpp/src/tests/FieldTable.cpp
@@ -29,6 +29,8 @@
using namespace qpid::framing;
+using std::string;
+
namespace qpid {
namespace tests {
diff --git a/qpid/cpp/src/tests/MessageBuilderTest.cpp b/qpid/cpp/src/tests/MessageBuilderTest.cpp
index c3d40ed88a..9adb133d40 100644
--- a/qpid/cpp/src/tests/MessageBuilderTest.cpp
+++ b/qpid/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/qpid/cpp/src/tests/MessageTest.cpp b/qpid/cpp/src/tests/MessageTest.cpp
index 7d67c92b37..7dd74361a9 100644
--- a/qpid/cpp/src/tests/MessageTest.cpp
+++ b/qpid/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/qpid/cpp/src/tests/MessageUtils.h b/qpid/cpp/src/tests/MessageUtils.h
index a1b140d484..991e2a2714 100644
--- a/qpid/cpp/src/tests/MessageUtils.h
+++ b/qpid/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/qpid/cpp/src/tests/QueueTest.cpp b/qpid/cpp/src/tests/QueueTest.cpp
index 0058aa5133..db84614a9b 100644
--- a/qpid/cpp/src/tests/QueueTest.cpp
+++ b/qpid/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/qpid/cpp/src/tests/TestMessageStore.h b/qpid/cpp/src/tests/TestMessageStore.h
index 20e0b755b2..0b63bc9c15 100644
--- a/qpid/cpp/src/tests/TestMessageStore.h
+++ b/qpid/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/qpid/cpp/src/tests/TxPublishTest.cpp b/qpid/cpp/src/tests/TxPublishTest.cpp
index 152581e4ba..a636646035 100644
--- a/qpid/cpp/src/tests/TxPublishTest.cpp
+++ b/qpid/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());
}