summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2012-10-18 11:53:29 -0500
committerDenis Kenzior <denkenz@gmail.com>2012-10-18 11:53:29 -0500
commitb83fc3276456a244618db6dda352a45bfa671691 (patch)
treeab40414cadedfe68d41d8c23528c66dd5fc2e915 /tools
parent35eb3a5e3d5261adab86cf412c504fa4ee9a19e4 (diff)
downloadofono-b83fc3276456a244618db6dda352a45bfa671691.tar.bz2
stktest: Add GetInput test sequence 1.1
Diffstat (limited to 'tools')
-rw-r--r--tools/stktest.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/tools/stktest.c b/tools/stktest.c
index 9d883623..c32ecab6 100644
--- a/tools/stktest.c
+++ b/tools/stktest.c
@@ -2166,6 +2166,30 @@ static DBusMessage *test_get_inkey_131(DBusMessage *msg,
return reply;
}
+static DBusMessage *test_get_input_11(DBusMessage *msg,
+ const char *alpha,
+ unsigned char icon_id,
+ const char *def_input,
+ unsigned char min, unsigned char max,
+ gboolean hide_typing)
+{
+ DBusMessage *reply;
+ const char *ret = "12345";
+
+ STKTEST_AGENT_ASSERT(g_str_equal(alpha, "Enter 12345"));
+ STKTEST_AGENT_ASSERT(icon_id == 0);
+ STKTEST_AGENT_ASSERT(g_str_equal(def_input, ""));
+ STKTEST_AGENT_ASSERT(min == 5);
+ STKTEST_AGENT_ASSERT(max == 5);
+ STKTEST_AGENT_ASSERT(hide_typing == FALSE);
+
+ reply = dbus_message_new_method_return(msg);
+ dbus_message_append_args(reply, DBUS_TYPE_STRING, &ret,
+ DBUS_TYPE_INVALID);
+
+ return reply;
+}
+
static void power_down_reply(DBusPendingCall *call, void *user_data)
{
__stktest_test_next();
@@ -2610,6 +2634,12 @@ static void __stktest_test_init(void)
sizeof(get_inkey_response_1311),
test_get_inkey_131,
expect_response_and_finish);
+ stktest_add_test("Get Input 1.1", "RequestDigits",
+ get_input_111, sizeof(get_input_111),
+ get_input_response_111,
+ sizeof(get_input_response_111),
+ test_get_input_11,
+ expect_response_and_finish);
}
static void test_destroy(gpointer user_data)