summaryrefslogtreecommitdiffstats
path: root/unit
diff options
context:
space:
mode:
authorJeevaka Badrappan <jeevaka.badrappan@elektrobit.com>2011-01-04 14:42:03 -0800
committerDenis Kenzior <denkenz@gmail.com>2011-01-05 10:07:02 -0600
commit2edb62e3bf33b0e48a5fd6567c194d03cb2ce78d (patch)
tree6fa1d3d3405440c29394c57758d5d5c0b8f92115 /unit
parentb447c564576cb290e86698ae883f17776ce43cbf (diff)
downloadofono-2edb62e3bf33b0e48a5fd6567c194d03cb2ce78d.tar.bz2
unit: add error status support for failure cases
Diffstat (limited to 'unit')
-rw-r--r--unit/test-stkutil.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/unit/test-stkutil.c b/unit/test-stkutil.c
index 185dfdde..f1cad78d 100644
--- a/unit/test-stkutil.c
+++ b/unit/test-stkutil.c
@@ -13999,6 +13999,7 @@ struct setup_idle_mode_text_test {
struct stk_text_attribute text_attr;
struct stk_frame_id frame_id;
char *html;
+ enum stk_command_parse_result status;
};
static unsigned char setup_idle_mode_text_111[] = { 0xD0, 0x1A, 0x81, 0x03,
@@ -14415,7 +14416,8 @@ static struct setup_idle_mode_text_test setup_idle_mode_text_data_241 = {
.icon_id = {
.qualifier = STK_ICON_QUALIFIER_TYPE_NON_SELF_EXPLANATORY,
.id = 0x01
- }
+ },
+ .status = STK_PARSE_RESULT_DATA_NOT_UNDERSTOOD
};
static struct setup_idle_mode_text_test setup_idle_mode_text_data_311 = {
@@ -14742,7 +14744,7 @@ static void test_setup_idle_mode_text(gconstpointer data)
command = stk_command_new_from_pdu(test->pdu, test->pdu_len);
g_assert(command);
- g_assert(command->status == STK_PARSE_RESULT_OK);
+ g_assert(command->status == test->status);
g_assert(command->number == 1);
g_assert(command->type == STK_COMMAND_TYPE_SETUP_IDLE_MODE_TEXT);
@@ -14772,6 +14774,7 @@ struct run_at_command_test {
struct stk_icon_id icon_id;
struct stk_text_attribute text_attr;
struct stk_frame_id frame_id;
+ enum stk_command_parse_result status;
};
static unsigned char run_at_command_111[] = { 0xD0, 0x12, 0x81, 0x03, 0x01,
@@ -15193,7 +15196,8 @@ static struct run_at_command_test run_at_command_data_251 = {
.icon_id = {
.qualifier = STK_ICON_QUALIFIER_TYPE_NON_SELF_EXPLANATORY,
.id = 0x01
- }
+ },
+ .status = STK_PARSE_RESULT_DATA_NOT_UNDERSTOOD
};
static struct run_at_command_test run_at_command_data_311 = {
@@ -15500,7 +15504,7 @@ static void test_run_at_command(gconstpointer data)
command = stk_command_new_from_pdu(test->pdu, test->pdu_len);
g_assert(command);
- g_assert(command->status == STK_PARSE_RESULT_OK);
+ g_assert(command->status == test->status);
g_assert(command->number == 1);
g_assert(command->type == STK_COMMAND_TYPE_RUN_AT_COMMAND);