modem-helpers: port supported modes filtering to use object logging

This commit is contained in:
Aleksander Morgado
2020-04-08 16:35:09 +02:00
parent fd1464cff0
commit 0f708daf0b
24 changed files with 40 additions and 27 deletions
+5 -5
View File
@@ -3423,7 +3423,7 @@ test_supported_mode_filter (void *f, gpointer d)
/* Only 2G supported */
all = build_mode_all (MM_MODEM_MODE_2G);
filtered = mm_filter_supported_modes (all, combinations);
filtered = mm_filter_supported_modes (all, combinations, NULL);
g_assert_cmpuint (filtered->len, ==, 1);
g_assert (find_mode_combination (filtered, MM_MODEM_MODE_2G, MM_MODEM_MODE_NONE));
g_array_unref (filtered);
@@ -3431,7 +3431,7 @@ test_supported_mode_filter (void *f, gpointer d)
/* Only 3G supported */
all = build_mode_all (MM_MODEM_MODE_3G);
filtered = mm_filter_supported_modes (all, combinations);
filtered = mm_filter_supported_modes (all, combinations, NULL);
g_assert_cmpuint (filtered->len, ==, 1);
g_assert (find_mode_combination (filtered, MM_MODEM_MODE_3G, MM_MODEM_MODE_NONE));
g_array_unref (filtered);
@@ -3439,7 +3439,7 @@ test_supported_mode_filter (void *f, gpointer d)
/* 2G and 3G supported */
all = build_mode_all (MM_MODEM_MODE_2G | MM_MODEM_MODE_3G);
filtered = mm_filter_supported_modes (all, combinations);
filtered = mm_filter_supported_modes (all, combinations, NULL);
g_assert_cmpuint (filtered->len, ==, 3);
g_assert (find_mode_combination (filtered, MM_MODEM_MODE_2G, MM_MODEM_MODE_NONE));
g_assert (find_mode_combination (filtered, MM_MODEM_MODE_3G, MM_MODEM_MODE_NONE));
@@ -3449,7 +3449,7 @@ test_supported_mode_filter (void *f, gpointer d)
/* 3G and 4G supported */
all = build_mode_all (MM_MODEM_MODE_3G | MM_MODEM_MODE_4G);
filtered = mm_filter_supported_modes (all, combinations);
filtered = mm_filter_supported_modes (all, combinations, NULL);
g_assert_cmpuint (filtered->len, ==, 3);
g_assert (find_mode_combination (filtered, MM_MODEM_MODE_3G, MM_MODEM_MODE_NONE));
g_assert (find_mode_combination (filtered, MM_MODEM_MODE_4G, MM_MODEM_MODE_NONE));
@@ -3459,7 +3459,7 @@ test_supported_mode_filter (void *f, gpointer d)
/* 2G, 3G and 4G supported */
all = build_mode_all (MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_4G);
filtered = mm_filter_supported_modes (all, combinations);
filtered = mm_filter_supported_modes (all, combinations, NULL);
g_assert_cmpuint (filtered->len, ==, 6);
g_assert (find_mode_combination (filtered, MM_MODEM_MODE_2G, MM_MODEM_MODE_NONE));
g_assert (find_mode_combination (filtered, MM_MODEM_MODE_3G, MM_MODEM_MODE_NONE));