summaryrefslogtreecommitdiffstats
path: root/unit
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-05-13 13:43:41 -0500
committerDenis Kenzior <denkenz@gmail.com>2010-05-13 13:43:41 -0500
commitfd6c902572b339f0da9d8a29cd8240f08f26ace8 (patch)
treec971c2adfe8922ae2c587e7435ac9d6036ed111d /unit
parent1ddc7ebf197ce7d6eabf6fc1493e095e004eac2f (diff)
downloadofono-fd6c902572b339f0da9d8a29cd8240f08f26ace8.tar.bz2
test-stkutil: Handle NULL strings
g_str_equal does not handle NULL strings
Diffstat (limited to 'unit')
-rw-r--r--unit/test-stkutil.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/unit/test-stkutil.c b/unit/test-stkutil.c
index 2fa449d8..59e69884 100644
--- a/unit/test-stkutil.c
+++ b/unit/test-stkutil.c
@@ -84,7 +84,11 @@ static void check_item(const struct stk_item *command,
const struct stk_item *test)
{
g_assert(command->id == test->id);
- g_assert(g_str_equal(command->text, test->text));
+
+ if (command->text == NULL)
+ g_assert(test->text == NULL);
+ else
+ g_assert(g_str_equal(command->text, test->text));
}
/* Defined in TS 102.223 Section 8.10 */