diff options
author | Denis Kenzior <denkenz@gmail.com> | 2012-09-28 18:45:51 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2012-10-03 09:10:43 -0500 |
commit | 67822514363e31c6e7f52a160ef7203aea75c53a (patch) | |
tree | 30b7f7fa0943cedb7424355e72dab3381607d040 /tools | |
parent | 4c3fd900c0a9de9c23d3dab44dbe6f84cb267bc3 (diff) | |
download | ofono-67822514363e31c6e7f52a160ef7203aea75c53a.tar.bz2 |
stktest: Fail test if DisplayText is not expected
Diffstat (limited to 'tools')
-rw-r--r-- | tools/stktest.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/stktest.c b/tools/stktest.c index 64332db5..adb7d75c 100644 --- a/tools/stktest.c +++ b/tools/stktest.c @@ -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); } |