diff options
author | Andrew Stitcher <astitcher@apache.org> | 2007-08-31 18:20:29 +0000 |
---|---|---|
committer | Andrew Stitcher <astitcher@apache.org> | 2007-08-31 18:20:29 +0000 |
commit | 655b3b5806bafdd784f6a9c242e26341bd6aeccc (patch) | |
tree | 01fe5108d9901b6c577a5930be6ca31a625300fd /cpp/src/tests/Uuid.cpp | |
parent | f5a1cf995f4956ec2dd83a60715b31ad065f7751 (diff) | |
download | qpid-python-655b3b5806bafdd784f6a9c242e26341bd6aeccc.tar.gz |
* 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
Diffstat (limited to 'cpp/src/tests/Uuid.cpp')
-rw-r--r-- | cpp/src/tests/Uuid.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
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<char*>(::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())); } |