stktest: Fail test if DisplayText is not expected

This commit is contained in:
Denis Kenzior 2012-09-28 18:45:51 -05:00
parent 4c3fd900c0
commit 6782251436
1 changed files with 12 additions and 0 deletions

View File

@ -231,6 +231,18 @@ static DBusMessage *agent_display_text(DBusConnection *conn, DBusMessage *msg,
test = cur_test->data;
func = test->agent_func;
if (strcmp(test->method, "DisplayText")) {
g_printerr("Wrong method called!\n");
__stktest_test_finish(FALSE);
return stktest_error_failed(msg);
}
if (func == NULL) {
g_printerr("DisplayText not expected to be called");
__stktest_test_finish(FALSE);
return stktest_error_failed(msg);
}
return func(msg, text, icon_id, urgent);
}