summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2012-10-18 20:29:09 -0500
committerDenis Kenzior <denkenz@gmail.com>2012-10-18 20:29:09 -0500
commit8eb847f267c50ebe996c9e97fda6e2edc64605e3 (patch)
tree5f139d1a33e5147a5914c6cc63346dc40e1f5816 /tools
parent594ff3678de80f59434300c8de2946967b430c21 (diff)
downloadofono-8eb847f267c50ebe996c9e97fda6e2edc64605e3.tar.bz2
stktest: Add GetInput test sequence 4.1-4.2
Diffstat (limited to 'tools')
-rw-r--r--tools/stktest.c62
1 files changed, 62 insertions, 0 deletions
diff --git a/tools/stktest.c b/tools/stktest.c
index 797be5fc..44e13450 100644
--- a/tools/stktest.c
+++ b/tools/stktest.c
@@ -2477,6 +2477,56 @@ static DBusMessage *test_get_input_32(DBusMessage *msg,
return reply;
}
+static DBusMessage *test_get_input_41(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 = "ЗДРАВСТВУЙТЕ";
+
+ STKTEST_AGENT_ASSERT(g_str_equal(alpha, "Enter Hello"));
+ STKTEST_AGENT_ASSERT(icon_id == 0);
+ STKTEST_AGENT_ASSERT(g_str_equal(def_input, ""));
+ STKTEST_AGENT_ASSERT(min == 12);
+ STKTEST_AGENT_ASSERT(max == 12);
+ 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 DBusMessage *test_get_input_42(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 = "ЗДРАВСТВУЙТЕЗДРАВСТВУЙТЕ"
+ "ЗДРАВСТВУЙТЕЗДРАВСТВУЙТЕ"
+ "ЗДРАВСТВУЙТЕЗДРАВСТВУЙ";
+
+ STKTEST_AGENT_ASSERT(g_str_equal(alpha, "Enter Hello"));
+ STKTEST_AGENT_ASSERT(icon_id == 0);
+ STKTEST_AGENT_ASSERT(g_str_equal(def_input, ""));
+ STKTEST_AGENT_ASSERT(min == 5);
+ STKTEST_AGENT_ASSERT(max == 255);
+ 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();
@@ -2999,6 +3049,18 @@ static void __stktest_test_init(void)
sizeof(get_input_response_321),
test_get_input_32,
expect_response_and_finish);
+ stktest_add_test("Get Input 4.1", "RequestInput",
+ get_input_411, sizeof(get_input_411),
+ get_input_response_411,
+ sizeof(get_input_response_411),
+ test_get_input_41,
+ expect_response_and_finish);
+ stktest_add_test("Get Input 4.2", "RequestInput",
+ get_input_421, sizeof(get_input_421),
+ get_input_response_421,
+ sizeof(get_input_response_421),
+ test_get_input_42,
+ expect_response_and_finish);
}
static void test_destroy(gpointer user_data)