summaryrefslogtreecommitdiffstats
path: root/unit
diff options
context:
space:
mode:
authorJeevaka Badrappan <jeevaka.badrappan@elektrobit.com>2011-03-19 00:09:23 -0700
committerDenis Kenzior <denkenz@gmail.com>2011-03-21 14:04:11 -0500
commita5f7b74566b03977c471c707d7f9c30a34eb5e04 (patch)
treea1c9b9614f095f60e9e0016c268de5477142b3a5 /unit
parent47ee31420098777d8cdf3109bf25fbf67b2bbfa0 (diff)
downloadofono-a5f7b74566b03977c471c707d7f9c30a34eb5e04.tar.bz2
unit: fix broken alpha id unit test cases
Diffstat (limited to 'unit')
-rw-r--r--unit/test-stkutil.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/unit/test-stkutil.c b/unit/test-stkutil.c
index f1cad78d..aa62aac3 100644
--- a/unit/test-stkutil.c
+++ b/unit/test-stkutil.c
@@ -129,7 +129,10 @@ static inline void check_address(const struct stk_address *command,
/* Defined in TS 102.223 Section 8.2 */
static inline void check_alpha_id(const char *command, const char *test)
{
- check_common_text(command, test);
+ if (test != NULL && strlen(test) > 0)
+ check_common_text(command, test);
+ else
+ g_assert(command == NULL);
}
/* Defined in TS 102.223 Section 8.3 */
@@ -5937,8 +5940,6 @@ static void test_setup_menu(gconstpointer data)
g_assert(command->src == STK_DEVICE_IDENTITY_TYPE_UICC);
g_assert(command->dst == STK_DEVICE_IDENTITY_TYPE_TERMINAL);
- if (test->alpha_id)
- g_assert(command->setup_menu.alpha_id);
check_alpha_id(command->setup_menu.alpha_id, test->alpha_id);
check_items(command->setup_menu.items, test->items);
check_items_next_action_indicator(&command->setup_menu.next_act,