diff options
author | Yang Gu <gyagp0@gmail.com> | 2010-05-26 22:39:10 +0800 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-05-27 07:08:42 -0500 |
commit | beb4e2c71aa3613cc7476d4603a6389ef9f9ef51 (patch) | |
tree | faf28323bc1e1723136815511977605d034b6b9e /unit | |
parent | 55a2596e84affb18fc45738deb7d45729692e13a (diff) | |
download | ofono-beb4e2c71aa3613cc7476d4603a6389ef9f9ef51.tar.bz2 |
teststk: Use check_common_text() to check string
Diffstat (limited to 'unit')
-rw-r--r-- | unit/test-stkutil.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/unit/test-stkutil.c b/unit/test-stkutil.c index 5cef2e68..16e1ee32 100644 --- a/unit/test-stkutil.c +++ b/unit/test-stkutil.c @@ -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)); } |