test: improve debugging for failed event type comparisons

This commit is contained in:
Peter Hutterer 2024-11-26 16:03:03 +10:00
parent 37ea216424
commit a491580fc0

View file

@ -1313,8 +1313,12 @@ _peck_eis_next_event(struct eis *eis, enum eis_event_type type, int lineno)
munit_errorf("Expected EIS event type %s, got none, line %d\n",
peck_eis_event_type_name(type),
lineno);
munit_assert_string_equal(peck_eis_event_name(event),
peck_eis_event_type_name(type));
if (eis_event_get_type(event) != type) {
munit_errorf("Expected EIS event type %s, got %s, line %d\n",
peck_eis_event_type_name(type),
peck_eis_event_type_name(eis_event_get_type(event)),
lineno);
}
log_debug(peck, "EIS passing %s to caller, line %d\n", peck_eis_event_name(event), lineno);