summaryrefslogtreecommitdiffstats
path: root/unit
diff options
context:
space:
mode:
authorAndrzej Zaborowski <andrew.zaborowski@intel.com>2010-05-16 16:06:09 +0200
committerDenis Kenzior <denkenz@gmail.com>2010-05-25 16:52:53 -0500
commitfad142acf231811dd367f5a0944842455847e554 (patch)
tree017eaa49971baa604267e59d01bc67a6568c31b1 /unit
parenta732863c874baabe9a6c547825bd0daa7bc0b893 (diff)
downloadofono-fad142acf231811dd367f5a0944842455847e554.tar.bz2
test-stkutil: Add Play Tone response tests
Diffstat (limited to 'unit')
-rw-r--r--unit/test-stkutil.c93
1 files changed, 93 insertions, 0 deletions
diff --git a/unit/test-stkutil.c b/unit/test-stkutil.c
index 8e67c193..d3bad9bb 100644
--- a/unit/test-stkutil.c
+++ b/unit/test-stkutil.c
@@ -11312,6 +11312,86 @@ static const struct terminal_response_test send_sms_response_data_311b = {
},
};
+static const unsigned char play_tone_response_111[] = {
+ 0x81, 0x03, 0x01, 0x20, 0x00, 0x82, 0x02, 0x82,
+ 0x81, 0x83, 0x01, 0x00,
+};
+
+static const struct terminal_response_test play_tone_response_data_111 = {
+ .pdu = play_tone_response_111,
+ .pdu_len = sizeof(play_tone_response_111),
+ .response = {
+ .number = 1,
+ .type = STK_COMMAND_TYPE_PLAY_TONE,
+ .qualifier = 0x00,
+ .src = STK_DEVICE_IDENTITY_TYPE_TERMINAL,
+ .dst = STK_DEVICE_IDENTITY_TYPE_UICC,
+ .result = {
+ .type = STK_RESULT_TYPE_SUCCESS,
+ },
+ },
+};
+
+static const unsigned char play_tone_response_119b[] = {
+ 0x81, 0x03, 0x01, 0x20, 0x00, 0x82, 0x02, 0x82,
+ 0x81, 0x83, 0x01, 0x30,
+};
+
+static const struct terminal_response_test play_tone_response_data_119b = {
+ .pdu = play_tone_response_119b,
+ .pdu_len = sizeof(play_tone_response_119b),
+ .response = {
+ .number = 1,
+ .type = STK_COMMAND_TYPE_PLAY_TONE,
+ .qualifier = 0x00,
+ .src = STK_DEVICE_IDENTITY_TYPE_TERMINAL,
+ .dst = STK_DEVICE_IDENTITY_TYPE_UICC,
+ .result = {
+ .type = STK_RESULT_TYPE_NOT_CAPABLE,
+ },
+ },
+};
+
+static const unsigned char play_tone_response_1114[] = {
+ 0x81, 0x03, 0x01, 0x20, 0x00, 0x82, 0x02, 0x82,
+ 0x81, 0x83, 0x01, 0x10,
+};
+
+static const struct terminal_response_test play_tone_response_data_1114 = {
+ .pdu = play_tone_response_1114,
+ .pdu_len = sizeof(play_tone_response_1114),
+ .response = {
+ .number = 1,
+ .type = STK_COMMAND_TYPE_PLAY_TONE,
+ .qualifier = 0x00,
+ .src = STK_DEVICE_IDENTITY_TYPE_TERMINAL,
+ .dst = STK_DEVICE_IDENTITY_TYPE_UICC,
+ .result = {
+ .type = STK_RESULT_TYPE_USER_TERMINATED,
+ },
+ },
+};
+
+static const unsigned char play_tone_response_311b[] = {
+ 0x81, 0x03, 0x01, 0x20, 0x00, 0x82, 0x02, 0x82,
+ 0x81, 0x83, 0x01, 0x04,
+};
+
+static const struct terminal_response_test play_tone_response_data_311b = {
+ .pdu = play_tone_response_311b,
+ .pdu_len = sizeof(play_tone_response_311b),
+ .response = {
+ .number = 1,
+ .type = STK_COMMAND_TYPE_PLAY_TONE,
+ .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);
@@ -11820,6 +11900,19 @@ int main(int argc, char **argv)
g_test_add_data_func("/teststk/Play Tone 6.1.3",
&play_tone_data_613, test_play_tone);
+ g_test_add_data_func("/teststk/Play Tone response 1.1.1",
+ &play_tone_response_data_111,
+ test_terminal_response_encoding);
+ g_test_add_data_func("/teststk/Play Tone response 1.1.9B",
+ &play_tone_response_data_119b,
+ test_terminal_response_encoding);
+ g_test_add_data_func("/teststk/Play Tone response 1.1.14",
+ &play_tone_response_data_1114,
+ test_terminal_response_encoding);
+ g_test_add_data_func("/teststk/Play Tone response 3.1.1B",
+ &play_tone_response_data_311b,
+ test_terminal_response_encoding);
+
g_test_add_data_func("/teststk/Poll Interval 1.1.1",
&poll_interval_data_111, test_poll_interval);