mirror of git://git.sysmocom.de/ofono
test-stkutil: Handle NULL strings
g_str_equal does not handle NULL strings
This commit is contained in:
parent
1ddc7ebf19
commit
fd6c902572
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue