From 655b3b5806bafdd784f6a9c242e26341bd6aeccc Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Fri, 31 Aug 2007 18:20:29 +0000 Subject: * Changes to make C++ client code use the asynchronous network IO * Fixed up the test for buffer changes * Removed unused buffer operations git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@571529 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/tests/Uuid.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'cpp/src/tests/Uuid.cpp') diff --git a/cpp/src/tests/Uuid.cpp b/cpp/src/tests/Uuid.cpp index da8c94aeae..db9a012a3d 100644 --- a/cpp/src/tests/Uuid.cpp +++ b/cpp/src/tests/Uuid.cpp @@ -62,12 +62,14 @@ BOOST_AUTO_TEST_CASE(testUuidOstream) { } BOOST_AUTO_TEST_CASE(testUuidEncodeDecode) { - Buffer buf(Uuid::size()); + char* buff = static_cast(::alloca(Uuid::size())); + Buffer wbuf(buff, Uuid::size()); Uuid uuid(sample.c_array()); - uuid.encode(buf); - buf.flip(); + uuid.encode(wbuf); + + Buffer rbuf(buff, Uuid::size()); Uuid decoded; - decoded.decode(buf); + decoded.decode(rbuf); BOOST_CHECK_EQUAL(string(sample.begin(), sample.end()), string(decoded.begin(), decoded.end())); } -- cgit v1.2.1