diff options
author | Olivier Andrieu <oliv__a@users.sourceforge.net> | 2004-03-12 14:18:35 +0000 |
---|---|---|
committer | Olivier Andrieu <oliv__a@users.sourceforge.net> | 2004-03-12 14:18:35 +0000 |
commit | 24ffe79c80d376b058c2d154b2b5f0ef8fee1c36 (patch) | |
tree | 41461551b5a0826ded6fc569785dec2b8785fff1 /dbus/dbus-message.c | |
parent | 520bdf704d2ff845b9e4cb91c8262245767f340a (diff) |
2004-03-12 Olivier Andrieu <oliv__a@users.sourceforge.net>
* dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
fix a bug with CUSTOM types.
* dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
a unit test for this bug (used to fail).
Diffstat (limited to 'dbus/dbus-message.c')
-rw-r--r-- | dbus/dbus-message.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/dbus/dbus-message.c b/dbus/dbus-message.c index 1c7ebf24..ffaef43c 100644 --- a/dbus/dbus-message.c +++ b/dbus/dbus-message.c @@ -6003,6 +6003,12 @@ message_iter_test (DBusMessage *message) dbus_free (str); dbus_free (data); + if (!dbus_message_iter_next (&iter)) + _dbus_assert_not_reached ("Reached end of arguments"); + + if (dbus_message_iter_get_byte (&iter) != 0xF0) + _dbus_assert_not_reached ("wrong value after custom"); + if (dbus_message_iter_next (&iter)) _dbus_assert_not_reached ("Didn't reach end of arguments"); } @@ -7140,6 +7146,8 @@ _dbus_message_test (const char *test_data_dir) dbus_message_iter_append_custom (&iter, "MyTypeName", "data", 5); + dbus_message_iter_append_byte (&iter, 0xF0); + message_iter_test (message); /* Message loader test */ |