From: Yang Gu <gyagp0@gmail.com>
To: ofono@ofono.org
Subject: [PATCH 4/8] teststk: Use check_common_text() to check string
Date: Wed, 26 May 2010 22:39:10 +0800 [thread overview]
Message-ID: <1274884754-12977-4-git-send-email-yang.gu@intel.com> (raw)
In-Reply-To: <1274884754-12977-1-git-send-email-yang.gu@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1438 bytes --]
---
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 e01cb17..2999412 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));
}
--
1.7.0.4
next prev parent reply other threads:[~2010-05-26 14:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-26 14:39 [PATCH 1/8] stk: Make parse_dataobj not consume extra data Yang Gu
2010-05-26 14:39 ` [PATCH 2/8] stk: Add parser for launch browser commands Yang Gu
2010-05-26 14:39 ` [PATCH 3/8] teststk: Add check of len in byte array Yang Gu
2010-05-26 14:39 ` Yang Gu [this message]
2010-05-26 14:39 ` [PATCH 5/8] stk: Fix the parser of send sms Yang Gu
2010-05-26 14:39 ` [PATCH 6/8] teststk: Add cases for send sms parser Yang Gu
2010-05-26 14:39 ` [PATCH 7/8] teststk: Add test for launch browser parser Yang Gu
2010-05-26 14:39 ` [PATCH 8/8] Move destructor prior to return Yang Gu
2010-05-27 17:48 ` [PATCH 1/8] stk: Make parse_dataobj not consume extra data Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1274884754-12977-4-git-send-email-yang.gu@intel.com \
--to=gyagp0@gmail.com \
--cc=ofono@ofono.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.