You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2018/12/20 03:32:24 UTC
[qpid-proton] 01/02: PROTON-1984: Some tests for pn_data_inspect
This is an automated email from the ASF dual-hosted git repository.
astitcher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git
commit ff001b861486f2b3407901463c6998dcca022e5f
Author: Andrew Stitcher <as...@apache.org>
AuthorDate: Wed Dec 19 14:42:55 2018 -0500
PROTON-1984: Some tests for pn_data_inspect
---
c/tests/data_test.cpp | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/c/tests/data_test.cpp b/c/tests/data_test.cpp
index 73fcc1f..207504a 100644
--- a/c/tests/data_test.cpp
+++ b/c/tests/data_test.cpp
@@ -89,4 +89,19 @@ TEST_CASE("data_multiple") {
pn_data_put_symbol(src, pn_bytes("baz"));
pn_data_fill(data, "M", src.get());
CHECK(":baz" == inspect(data));
+
+ /* Described list with open frame descriptor */
+ pn_data_clear(data);
+ pn_data_fill(data, "DL[]", 16);
+ CHECK("@open(16) []" == inspect(data));
+
+ /* open frame with some fields */
+ pn_data_clear(data);
+ pn_data_fill(data, "DL[SSnI]", 16, "container-1", 0, 965);
+ CHECK("@open(16) [container-id=\"container-1\", channel-max=965]" == inspect(data));
+
+ /* Map */
+ pn_data_clear(data);
+ pn_data_fill(data, "{S[iii]SI}", "foo", 1, 987, 3, "bar", 965);
+ CHECK("{\"foo\"=[1, 987, 3], \"bar\"=965}" == inspect(data));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org