diff options
author | Denis Kenzior <denkenz@gmail.com> | 2012-10-09 11:25:56 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2012-10-09 11:27:17 -0500 |
commit | 8b51ef89cc68a87919df3e8b9369d00bc3333959 (patch) | |
tree | be13e09596e3b034a3f0a1f04b37938066baa710 /tools | |
parent | 947e3b4734d79883d9e1436f2ec7e56b3051f566 (diff) | |
download | ofono-8b51ef89cc68a87919df3e8b9369d00bc3333959.tar.bz2 |
stktest: Add GetInkey test sequence 5.1
Diffstat (limited to 'tools')
-rw-r--r-- | tools/stktest.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/tools/stktest.c b/tools/stktest.c index a304ee10..a7cbe430 100644 --- a/tools/stktest.c +++ b/tools/stktest.c @@ -1659,6 +1659,40 @@ static DBusMessage *test_get_inkey_41(DBusMessage *msg, return reply; } +static DBusMessage *test_get_inkey_51a(DBusMessage *msg, + const char *alpha, + unsigned char icon_id) +{ + DBusMessage *reply; + dbus_bool_t ret = 1; + + STKTEST_AGENT_ASSERT(g_str_equal(alpha, "Enter YES")); + STKTEST_AGENT_ASSERT(icon_id == 0); + + reply = dbus_message_new_method_return(msg); + dbus_message_append_args(reply, DBUS_TYPE_BOOLEAN, &ret, + DBUS_TYPE_INVALID); + + return reply; +} + +static DBusMessage *test_get_inkey_51b(DBusMessage *msg, + const char *alpha, + unsigned char icon_id) +{ + DBusMessage *reply; + dbus_bool_t ret = 0; + + STKTEST_AGENT_ASSERT(g_str_equal(alpha, "Enter NO")); + STKTEST_AGENT_ASSERT(icon_id == 0); + + reply = dbus_message_new_method_return(msg); + dbus_message_append_args(reply, DBUS_TYPE_BOOLEAN, &ret, + DBUS_TYPE_INVALID); + + return reply; +} + static void power_down_reply(DBusPendingCall *call, void *user_data) { __stktest_test_next(); @@ -1964,6 +1998,18 @@ static void __stktest_test_init(void) sizeof(get_inkey_response_411), test_get_inkey_41, expect_response_and_finish); + stktest_add_test("Get Inkey 5.1a", "RequestConfirmation", + get_inkey_511, sizeof(get_inkey_511), + get_inkey_response_511, + sizeof(get_inkey_response_511), + test_get_inkey_51a, + expect_response_and_finish); + stktest_add_test("Get Inkey 5.1b", "RequestConfirmation", + get_inkey_512, sizeof(get_inkey_512), + get_inkey_response_512, + sizeof(get_inkey_response_512), + test_get_inkey_51b, + expect_response_and_finish); } static void test_destroy(gpointer user_data) |