summaryrefslogtreecommitdiff
path: root/cpp/src/tests
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2013-08-13 15:06:42 +0000
committerGordon Sim <gsim@apache.org>2013-08-13 15:06:42 +0000
commit592e3317e4277cc469b0bdc29f4e809c1b639d07 (patch)
tree2f4aef48e274ace695d87c86efdfbc4fc4cee36a /cpp/src/tests
parent57f7ef0a6cf49ba5275360b8e114b27034ee1548 (diff)
downloadqpid-python-592e3317e4277cc469b0bdc29f4e809c1b639d07.tar.gz
QPID-5040: support for sending and receiving messages with AmqpValue sections
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1513536 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/tests')
-rw-r--r--cpp/src/tests/qpid-receive.cpp6
-rw-r--r--cpp/src/tests/qpid-send.cpp5
2 files changed, 6 insertions, 5 deletions
diff --git a/cpp/src/tests/qpid-receive.cpp b/cpp/src/tests/qpid-receive.cpp
index d43598f551..d00b828ddc 100644
--- a/cpp/src/tests/qpid-receive.cpp
+++ b/cpp/src/tests/qpid-receive.cpp
@@ -232,8 +232,10 @@ int main(int argc, char ** argv)
std::cout << "Properties: " << msg.getProperties() << std::endl;
std::cout << std::endl;
}
- if (opts.printContent)
- std::cout << msg.getContent() << std::endl;//TODO: handle map or list messages
+ if (opts.printContent) {
+ if (!msg.getContentObject().isVoid()) std::cout << msg.getContentObject() << std::endl;
+ else std::cout << msg.getContent() << std::endl;
+ }
if (opts.messages && count >= opts.messages) done = true;
}
}
diff --git a/cpp/src/tests/qpid-send.cpp b/cpp/src/tests/qpid-send.cpp
index 72ccf1466d..efc6f95448 100644
--- a/cpp/src/tests/qpid-send.cpp
+++ b/cpp/src/tests/qpid-send.cpp
@@ -262,9 +262,8 @@ class MapContentGenerator : public ContentGenerator {
public:
MapContentGenerator(const Options& opt) : opts(opt) {}
virtual bool setContent(Message& msg) {
- Variant::Map map;
- opts.setEntries(map);
- encode(map, msg);
+ msg.getContentObject() = qpid::types::Variant::Map();
+ opts.setEntries(msg.getContentObject().asMap());
return true;
}
private: