summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrzej Zaborowski <andrew.zaborowski@intel.com>2010-05-27 06:59:55 +0200
committerDenis Kenzior <denkenz@gmail.com>2010-05-28 11:37:57 -0500
commit27a74e772e165ef8a14011ade25f5caae884da30 (patch)
treeef442c2860e83b1782377432f501a803017e6058
parent4c4e2e9f034358e2865878ab8c1adb2e387cc6b6 (diff)
downloadofono-27a74e772e165ef8a14011ade25f5caae884da30.tar.bz2
test-stkutil: Add the Send DTMF response tests
-rw-r--r--unit/test-stkutil.c72
1 files changed, 72 insertions, 0 deletions
diff --git a/unit/test-stkutil.c b/unit/test-stkutil.c
index c25c0b2b..b411df39 100644
--- a/unit/test-stkutil.c
+++ b/unit/test-stkutil.c
@@ -17624,6 +17624,68 @@ static const struct terminal_response_test run_at_command_response_data_251 = {
},
};
+static const unsigned char send_dtmf_response_111[] = {
+ 0x81, 0x03, 0x01, 0x14, 0x00, 0x82, 0x02, 0x82,
+ 0x81, 0x83, 0x01, 0x00,
+};
+
+static const struct terminal_response_test send_dtmf_response_data_111 = {
+ .pdu = send_dtmf_response_111,
+ .pdu_len = sizeof(send_dtmf_response_111),
+ .response = {
+ .number = 1,
+ .type = STK_COMMAND_TYPE_SEND_DTMF,
+ .qualifier = 0x00,
+ .src = STK_DEVICE_IDENTITY_TYPE_TERMINAL,
+ .dst = STK_DEVICE_IDENTITY_TYPE_UICC,
+ .result = {
+ .type = STK_RESULT_TYPE_SUCCESS,
+ },
+ },
+};
+
+static const unsigned char send_dtmf_response_141[] = {
+ 0x81, 0x03, 0x01, 0x14, 0x00, 0x82, 0x02, 0x82,
+ 0x81, 0x83, 0x02, 0x20, 0x07,
+};
+
+static const struct terminal_response_test send_dtmf_response_data_141 = {
+ .pdu = send_dtmf_response_141,
+ .pdu_len = sizeof(send_dtmf_response_141),
+ .response = {
+ .number = 1,
+ .type = STK_COMMAND_TYPE_SEND_DTMF,
+ .qualifier = 0x00,
+ .src = STK_DEVICE_IDENTITY_TYPE_TERMINAL,
+ .dst = STK_DEVICE_IDENTITY_TYPE_UICC,
+ .result = {
+ .type = STK_RESULT_TYPE_TERMINAL_BUSY,
+ .additional_len = 1, /* Not in speech call */
+ .additional = (unsigned char[1]) { 0x07 },
+ },
+ },
+};
+
+static const unsigned char send_dtmf_response_211b[] = {
+ 0x81, 0x03, 0x01, 0x14, 0x00, 0x82, 0x02, 0x82,
+ 0x81, 0x83, 0x01, 0x04,
+};
+
+static const struct terminal_response_test send_dtmf_response_data_211b = {
+ .pdu = send_dtmf_response_211b,
+ .pdu_len = sizeof(send_dtmf_response_211b),
+ .response = {
+ .number = 1,
+ .type = STK_COMMAND_TYPE_SEND_DTMF,
+ .qualifier = 0x00,
+ .src = STK_DEVICE_IDENTITY_TYPE_TERMINAL,
+ .dst = STK_DEVICE_IDENTITY_TYPE_UICC,
+ .result = {
+ .type = STK_RESULT_TYPE_NO_ICON,
+ },
+ },
+};
+
int main(int argc, char **argv)
{
g_test_init(&argc, &argv, NULL);
@@ -19170,6 +19232,16 @@ int main(int argc, char **argv)
g_test_add_data_func("/teststk/Send DTMF 6.1.1",
&send_dtmf_data_611, test_send_dtmf);
+ g_test_add_data_func("/teststk/Send DTMF response 1.1.1",
+ &send_dtmf_response_data_111,
+ test_terminal_response_encoding);
+ g_test_add_data_func("/teststk/Send DTMF response 1.4.1",
+ &send_dtmf_response_data_141,
+ test_terminal_response_encoding);
+ g_test_add_data_func("/teststk/Send DTMF response 2.1.1B",
+ &send_dtmf_response_data_211b,
+ test_terminal_response_encoding);
+
g_test_add_data_func("/teststk/Language Notification 1.1.1",
&language_notification_data_111, test_language_notification);
g_test_add_data_func("/teststk/Language Notification 1.2.1",