aboutsummaryrefslogtreecommitdiff
path: root/plugins/ublox/tests/test-modem-helpers-ublox.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ublox/tests/test-modem-helpers-ublox.c')
-rw-r--r--plugins/ublox/tests/test-modem-helpers-ublox.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/plugins/ublox/tests/test-modem-helpers-ublox.c b/plugins/ublox/tests/test-modem-helpers-ublox.c
index e0a7d9a8..c069bee2 100644
--- a/plugins/ublox/tests/test-modem-helpers-ublox.c
+++ b/plugins/ublox/tests/test-modem-helpers-ublox.c
@@ -651,14 +651,22 @@ common_validate_uact_response (const gchar *str,
GArray *bands;
bands = mm_ublox_parse_uact_response (str, &error);
- g_assert_no_error (error);
- common_compare_bands (bands, expected_bands, n_expected_bands);
+ if (n_expected_bands > 0) {
+ g_assert (bands);
+ g_assert_no_error (error);
+ common_compare_bands (bands, expected_bands, n_expected_bands);
+ } else {
+ g_assert (!bands);
+ g_assert (error);
+ g_error_free (error);
+ }
}
static void
test_uact_response_empty_list (void)
{
+ common_validate_uact_response ("", NULL, 0);
common_validate_uact_response ("+UACT: ,,,\r\n", NULL, 0);
}