summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/tests/amqp_0_10/serialize.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/cpp/src/tests/amqp_0_10/serialize.cpp b/cpp/src/tests/amqp_0_10/serialize.cpp
index 6dfa5c191d..f07feeb18a 100644
--- a/cpp/src/tests/amqp_0_10/serialize.cpp
+++ b/cpp/src/tests/amqp_0_10/serialize.cpp
@@ -348,9 +348,10 @@ QPID_AUTO_TEST_CASE(testStruct) {
dp.exchange = "foo";
Codec::encode(back_inserter(data))(dp);
- uint16_t encodedBits=uint8_t(data[1]); // Little-endian
+ // Skip 4 bytes size, little-endian decode for pack bits.
+ uint16_t encodedBits=uint8_t(data[5]);
encodedBits <<= 8;
- encodedBits += uint8_t(data[0]);
+ encodedBits += uint8_t(data[4]);
BOOST_CHECK_EQUAL(encodedBits, packBits(dp));
data.clear();