From c53c4cc94e121c0fc3df6010cffa1bbb49a779db Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Wed, 31 Mar 2010 21:13:12 +0000 Subject: Merged the changes from the qmf-devel0.7a branch back to the trunk. This is a checkpoint along the QMFv2 development path. This update introduces portions of QMFv2 into the code: - The C++ agent (qpid/agent) uses QMFv2 for data and method transfer o The APIs no longer use qpid::framing::* o Consequently, boost is no longer referenced from the API headers. o Agents and Objects are now referenced by strings, not numbers. o Schema transfer still uses the QMFv1 format. - The broker-resident agent can use QMFv1 or QMFv2 based on the command line options. It defaults to QMFv1 for compatibility. - The pure-python QMF console (qmf.console) can concurrently interact with both QMFv1 and QMFv2 agents. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@929716 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/tests/ManagementTest.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'qpid/cpp/src/tests/ManagementTest.cpp') diff --git a/qpid/cpp/src/tests/ManagementTest.cpp b/qpid/cpp/src/tests/ManagementTest.cpp index d05b4676ba..99b9c1f03e 100644 --- a/qpid/cpp/src/tests/ManagementTest.cpp +++ b/qpid/cpp/src/tests/ManagementTest.cpp @@ -56,32 +56,34 @@ QPID_AUTO_TEST_CASE(testObjectIdSerializeString) { } QPID_AUTO_TEST_CASE(testObjectIdEncode) { - char buffer[100]; - Buffer msgBuf(buffer, 100); - msgBuf.putLongLong(0x1002000030000004LL); - msgBuf.putLongLong(0x0000000000000005LL); - msgBuf.reset(); + qpid::types::Variant::Map oidMap; - ObjectId oid(msgBuf); + ObjectId oid(1, 2, 3, 9999); + oid.setV2Key("testkey"); + oid.setAgentName("myAgent"); std::stringstream out1; out1 << oid; - BOOST_CHECK_EQUAL(out1.str(), "1-2-3-4-5"); + BOOST_CHECK_EQUAL(out1.str(), "1-2-3-myAgent-9999"); } QPID_AUTO_TEST_CASE(testObjectIdAttach) { AgentAttachment agent; - ObjectId oid(&agent, 10, 20, 50); + ObjectId oid(&agent, 10, 20); + oid.setV2Key("GabbaGabbaHey"); + oid.setAgentName("MrSmith"); std::stringstream out1; out1 << oid; - BOOST_CHECK_EQUAL(out1.str(), "10-20-0-0-50"); + + BOOST_CHECK_EQUAL(out1.str(), "10-20-0-MrSmith-0"); agent.setBanks(30, 40); std::stringstream out2; out2 << oid; - BOOST_CHECK_EQUAL(out2.str(), "10-20-30-40-50"); + + BOOST_CHECK_EQUAL(out2.str(), "10-20-30-MrSmith-0"); } QPID_AUTO_TEST_CASE(testConsoleObjectId) { -- cgit v1.2.1