teststk: Use check_common_text() to check string

This commit is contained in:
Yang Gu 2010-05-26 22:39:10 +08:00 committed by Denis Kenzior
parent 55a2596e84
commit beb4e2c71a
1 changed files with 4 additions and 8 deletions

View File

@ -91,7 +91,7 @@ static inline void check_address(const struct stk_address *command,
const struct stk_address *test)
{
g_assert(command->ton_npi == test->ton_npi);
g_assert(g_str_equal(command->number, test->number));
check_common_text(command->number, test->number);
}
/* Defined in TS 102.223 Section 8.2 */
@ -139,11 +139,7 @@ static void check_item(const struct stk_item *command,
const struct stk_item *test)
{
g_assert(command->id == test->id);
if (command->text == NULL)
g_assert(test->text == NULL);
else
g_assert(g_str_equal(command->text, test->text));
check_common_text(command->text, test->text);
}
/* Defined in TS 102.223 Section 8.10 */
@ -181,8 +177,8 @@ static void check_gsm_sms_tpdu(const struct sms *command,
{
g_assert(command->submit.mr == test->submit.mr);
g_assert(command->submit.udl == test->submit.udl);
g_assert(g_str_equal(command->submit.daddr.address,
test->submit.daddr.address));
check_common_text(command->submit.daddr.address,
test->submit.daddr.address);
g_assert(g_mem_equal(command->submit.ud, test->submit.ud,
test->submit.udl));
}