summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2012-10-20 21:16:33 -0500
committerDenis Kenzior <denkenz@gmail.com>2012-10-20 21:17:18 -0500
commite3b10a6ace37574ccd0bfee98ba2b5913ff00206 (patch)
tree71ce0276173da95659192fa6f588f7bb972519d3 /tools
parent7ace5b454cb3dcada79a6f1317ec5d2dfeaa5a8b (diff)
downloadofono-e3b10a6ace37574ccd0bfee98ba2b5913ff00206.tar.bz2
stktest: Add GetInput test sequence 12.1-12.2
Diffstat (limited to 'tools')
-rw-r--r--tools/stktest.c63
1 files changed, 63 insertions, 0 deletions
diff --git a/tools/stktest.c b/tools/stktest.c
index d9a3e315..2eb78322 100644
--- a/tools/stktest.c
+++ b/tools/stktest.c
@@ -2838,6 +2838,57 @@ GET_INPUT_9X_11X_TEMPLATE(112, "ルルルルルルルルルルルルルルルル
"ルルルルルルルルルルルルルルルルルルルル"
"ルルルルルルルルルル")
+static DBusMessage *test_get_input_121(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 == 2);
+ STKTEST_AGENT_ASSERT(max == 2);
+ 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_122(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();
@@ -3505,6 +3556,18 @@ static void __stktest_test_init(void)
sizeof(get_input_response_1121),
test_get_input_112,
expect_response_and_finish);
+ stktest_add_test("Get Input 12.1", "RequestInput",
+ get_input_1211, sizeof(get_input_1211),
+ get_input_response_1211,
+ sizeof(get_input_response_1211),
+ test_get_input_121,
+ expect_response_and_finish);
+ stktest_add_test("Get Input 12.2", "RequestInput",
+ get_input_1221, sizeof(get_input_1221),
+ get_input_response_1221,
+ sizeof(get_input_response_1221),
+ test_get_input_122,
+ expect_response_and_finish);
}
static void test_destroy(gpointer user_data)