summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/test-bus-marshal.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-07-29 18:20:17 +0200
committerLennart Poettering <lennart@poettering.net>2015-07-29 18:20:17 +0200
commit2b32ffa07dfb62385f82d073c9c2fff890ac1889 (patch)
tree21dcccfa6783a71e99b53bc3965297a8b6c8832d /src/libsystemd/sd-bus/test-bus-marshal.c
parent4eb344b1b8478e9a99c727cf495aa13c4e608b00 (diff)
parent03ebf5e89bf63a32a2ffe253bec9e506f6917c80 (diff)
Merge pull request #774 from dvdhrm/gvariant3
gvariant: fix encoding of unary type and root-variant (v3)
Diffstat (limited to 'src/libsystemd/sd-bus/test-bus-marshal.c')
-rw-r--r--src/libsystemd/sd-bus/test-bus-marshal.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libsystemd/sd-bus/test-bus-marshal.c b/src/libsystemd/sd-bus/test-bus-marshal.c
index 59deaea89f..b203707f27 100644
--- a/src/libsystemd/sd-bus/test-bus-marshal.c
+++ b/src/libsystemd/sd-bus/test-bus-marshal.c
@@ -134,6 +134,9 @@ int main(int argc, char *argv[]) {
r = sd_bus_message_append(m, "y(ty)y(yt)y", 8, 777ULL, 7, 9, 77, 7777ULL, 10);
assert_se(r >= 0);
+ r = sd_bus_message_append(m, "()");
+ assert_se(r >= 0);
+
r = sd_bus_message_append(m, "ba(ss)", 255, 3, "aaa", "1", "bbb", "2", "ccc", "3");
assert_se(r >= 0);
@@ -271,6 +274,9 @@ int main(int argc, char *argv[]) {
assert_se(r > 0);
assert_se(v == 10);
+ r = sd_bus_message_read(m, "()");
+ assert_se(r > 0);
+
r = sd_bus_message_read(m, "ba(ss)", &boolean, 3, &x, &y, &a, &b, &c, &d);
assert_se(r > 0);
assert_se(boolean);
@@ -350,7 +356,7 @@ int main(int argc, char *argv[]) {
assert_se(sd_bus_message_verify_type(m, 'a', "{yv}") > 0);
- r = sd_bus_message_skip(m, "a{yv}y(ty)y(yt)y");
+ r = sd_bus_message_skip(m, "a{yv}y(ty)y(yt)y()");
assert_se(r >= 0);
assert_se(sd_bus_message_verify_type(m, 'b', NULL) > 0);