diff options
author | Alan Conway <aconway@apache.org> | 2008-04-15 15:57:58 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2008-04-15 15:57:58 +0000 |
commit | a106490812ea883620e84f50b4ce001d375e81f7 (patch) | |
tree | abef5622c4735cd59bf020415f87d25f446240af /qpid/cpp/src/tests/amqp_0_10 | |
parent | 7bfb4bedeedeb4a24851b08b3b890b6c02ae7990 (diff) | |
download | qpid-python-a106490812ea883620e84f50b4ce001d375e81f7.tar.gz |
Cleanup of size calculations and handling UnknownStruct
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@648297 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/amqp_0_10')
-rw-r--r-- | qpid/cpp/src/tests/amqp_0_10/serialize.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/qpid/cpp/src/tests/amqp_0_10/serialize.cpp b/qpid/cpp/src/tests/amqp_0_10/serialize.cpp index f38de33bcc..3133db2a7f 100644 --- a/qpid/cpp/src/tests/amqp_0_10/serialize.cpp +++ b/qpid/cpp/src/tests/amqp_0_10/serialize.cpp @@ -227,6 +227,15 @@ BOOST_AUTO_TEST_CASE(testStruct32) { BOOST_REQUIRE(dp2); BOOST_CHECK_EQUAL(dp2->priority, message::MEDIUM); BOOST_CHECK_EQUAL(dp2->routingKey, "foo"); + + // Verify we can recode an unknown struct unchanged. + data.clear(); + Codec::encode(back_inserter(data))(uint32_t(10)); + data.append(10, 'X'); + Codec::decode(data.begin())(s2); + string data2; + Codec::decode(back_inserter(data2)); + BOOST_CHECK_EQUAL(data, data2); } struct DummyPacked { |