summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2017-12-12 14:04:47 +0000
committerSimon McVittie <smcv@collabora.com>2018-01-11 18:35:08 +0000
commit138f51f94afc385fb902f00c808a682e43198dad (patch)
tree06fdcec060e73fdfee70a0256585c4abcdde7ba9
parente6263cbefbb7f559e18ae2a6492059bbbcbc1858 (diff)
header-fields test: Exercise _dbus_message_remove_unknown_fields
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=100317 Reviewed-by: Philip Withnall <withnall@endlessm.com> Signed-off-by: Simon McVittie <smcv@collabora.com>
-rw-r--r--test/header-fields.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/header-fields.c b/test/header-fields.c
index 150a02ac..09b4f99c 100644
--- a/test/header-fields.c
+++ b/test/header-fields.c
@@ -456,7 +456,11 @@ test_weird_header_field (void *user_data,
goto out;
}
- /* TODO: Actually filter its header */
+ if (!_dbus_message_remove_unknown_fields (filtered))
+ {
+ g_assert_false (have_memory);
+ goto out;
+ }
/* All known headers are the same as in the modified message that was
* deserialized from the same blob */
@@ -520,10 +524,7 @@ test_weird_header_field (void *user_data,
==, DBUS_TYPE_BYTE);
_dbus_type_reader_read_basic (&sub, &field_code);
- if (field_code == NOT_A_HEADER_FIELD)
- {
- g_test_message ("TODO: header field was not filtered out");
- }
+ g_assert_cmpuint (field_code, !=, NOT_A_HEADER_FIELD);
_dbus_type_reader_next (&array);
}