diff options
Diffstat (limited to 'cpp/src/tests')
-rw-r--r-- | cpp/src/tests/Makefile.am | 6 | ||||
-rw-r--r-- | cpp/src/tests/ManagementTest.cpp | 22 |
2 files changed, 15 insertions, 13 deletions
diff --git a/cpp/src/tests/Makefile.am b/cpp/src/tests/Makefile.am index 7377edc3bb..9c1a761062 100644 --- a/cpp/src/tests/Makefile.am +++ b/cpp/src/tests/Makefile.am @@ -267,15 +267,15 @@ txjob_LDADD=$(lib_client) check_PROGRAMS+=PollerTest PollerTest_SOURCES=PollerTest.cpp -PollerTest_LDADD=$(lib_common) $(SOCKLIBS) +PollerTest_LDADD=$(lib_common) $(lib_client) $(SOCKLIBS) check_PROGRAMS+=DispatcherTest DispatcherTest_SOURCES=DispatcherTest.cpp -DispatcherTest_LDADD=$(lib_common) $(SOCKLIBS) +DispatcherTest_LDADD=$(lib_common) $(lib_client) $(SOCKLIBS) check_PROGRAMS+=datagen datagen_SOURCES=datagen.cpp -datagen_LDADD=$(lib_common) +datagen_LDADD=$(lib_common) $(lib_client) check_PROGRAMS+=qrsh_server qrsh_server_SOURCES=qrsh_server.cpp diff --git a/cpp/src/tests/ManagementTest.cpp b/cpp/src/tests/ManagementTest.cpp index d05b4676ba..99b9c1f03e 100644 --- a/cpp/src/tests/ManagementTest.cpp +++ b/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) { |